Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

array of random integers python

>>> np.random.randint(2, size=10)
array([1, 0, 0, 0, 1, 1, 0, 0, 1, 0])
>>> np.random.randint(1, size=10)
array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
Comment

PREVIOUS NEXT
Code Example
Python :: seaborn axis limits 
Python :: pandas change last row 
Python :: normalize values between 0 and 1 python 
Python :: how to multiply in django template 
Python :: keyerror dislike_count pafy 
Python :: python check if a variable is an pandaDataframe 
Python :: install python 3.9 linux 
Python :: python add zero to string 
Python :: python - give a name to index column 
Python :: string to datetime 
Python :: pytorch load model 
Python :: axis font size matplotlib 
Python :: how to replace a word in csv file using python 
Python :: confidence intervals in python 
Python :: clear console python 
Python :: torch save state dict 
Python :: python pandas drop column by index 
Python :: python sqrt import 
Python :: Find the Runner Up Score solution in python3 
Python :: tkfiledialog python 3 example 
Python :: how to remove plotly toolbar 
Python :: python selenium move cursor to element 
Python :: time it in jupyter notebook 
Python :: dropdown in tkinter 
Python :: label encoding in pandas 
Python :: difference python list and numpy array 
Python :: django template capitalize equivalent 
Python :: python deep copy of a dictionary 
Python :: how to make turtle invisible python 
Python :: get length of csv file with python 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =