Answers for "how to define a numpy array in python"

2

numpy array from list

>>> a = [1, 2]
>>> np.asarray(a)
array([1, 2])
Posted by: Guest on September-21-2020
0

numpy init array

a=[]
for i in range(8):
    a.append(i)
Posted by: Guest on October-22-2020

Code answers related to "how to define a numpy array in python"

Python Answers by Framework

Browse Popular Code Answers by Language