0

I tried importing the numpy package in Python and faced a lot of problems initially because of the path variable. After handling that issue and importing numpy,using the array object gives me an attribute error.

>>import numpy
>>x=numpy.array([1,2,3])
Traceback (most recent call last):
  File "<stdin>",line 1, in <module>
AttributeError: 'module' object has no attribute 'array'

Please help.

1 Answer 1

1

My attempt of running that code

Seems like your numpy was imported incorrectly. Did you try to use pip?

Sign up to request clarification or add additional context in comments.

1 Comment

same here. I guess the problem is with your numpy installation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.