Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python numpy array size of n

numpy.array([0] * n) #creates an int64 numpy array of size n with each element having a vaule of 0
numpy.array([0] * n, dtype = '<type>') #creates a numpy array of size n with a type of <type>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #numpy #array #size
ADD COMMENT
Topic
Name
4+5 =