Answers for "create a numpy array with n m size"

1

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>
Posted by: Guest on October-07-2020

Code answers related to "create a numpy array with n m size"

Python Answers by Framework

Browse Popular Code Answers by Language