Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

create numpy table with random values in range

import numpy as np

# if the shape is not mentioned the output will just be a random integer in the given range
rand_int = np.random.randint(5,10)  
print("First array", rand_int)

rand_int2 = np.random.randint(10,90,(4,5)) # random numpy array of shape (4,5)
print("Second array", rand_int2)

rand_int3 = np.random.randint(50,75,(2,2), dtype='int64')
print("Third array", rand_int3)
Comment

PREVIOUS NEXT
Code Example
Python :: koncemzem 
Python :: erreur install pyaudio 
Python :: compute count2(aacaagctgataaacatttaaagag, aaaaa). in python 
Python :: how to redefine a legend in pandas 
Python :: python seaborn violin plot fit data better 
Python :: views.home not found django 
Python :: pyrogram 
Python :: datetime python 
Python :: add trendline to plot matplotlib 
Python :: how to split a string from the beginning to a specific character in python 
Python :: How to use PatBlt in Python 
Python :: remove duplicates from list python preserve order 
Python :: print matrix eleme 
Python :: pyspark correlation between multiple columns 
Python :: button position python 
Python :: how to give multiple option to the user and ask the same question again and again until the user tells one of the options 
Python :: numpy series reset index 
Python :: load all csv files in a folder python pandas 
Python :: open mat file in python 
Python :: dataframe groupby to dictionary 
Python :: flask oneid 
Python :: python datetime from isoformat 
Python :: factorise expression python 
Python :: python edit text file 
Python :: python json indented 
Python :: pythonic 
Python :: python sort dataframe by one column 
Python :: python csv delete specific row 
Python :: python inheritance remove an attribute 
Python :: install python 3 on mac 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =