Reputation: 437
While converting the list to numpy array gives the error
AttributeError: 'numpy.int64' object has no attribute 'array"
Code:
d=np.array(list1)
Upvotes: 1
Views: 2149
Reputation: 846
As mentioned by @venky, check if you are using "np" as a variable somewhere. If not try the code below and see if you get an error. It should work
import numpy as np
mylist = [1,2,3]
a = np.array(mylist)
type(a)
Upvotes: 4