np.arrange error - no attribute - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: np.arrange error - no attribute (/thread-3860.html) |
np.arrange error - no attribute - pksherard - Jul-01-2017 Python novice. I am using the Canopy Python editor. I cannot get the arrange command to work. ---------------------------------------- import numpy as np pp=np.arrange(10) pp=np.arrange(1,10) pp=np.arrange(1,10,1) all commands give error: AttributeError: 'module' object has no attribute 'arrange' Tried many other combinations for argument, no luck. RE: np.arrange error - no attribute - Larz60+ - Jul-01-2017 Use code tags RE: np.arrange error - no attribute - zivoni - Jul-04-2017 Numpy has arange() function, not arrange() . Your examples should be like pp = np.arange(10) RE: np.arrange error - no attribute - nilamo - Aug-16-2017 (Jul-01-2017, 12:44 PM)pksherard Wrote: all commands give error: For future reference, the error is telling you that the function you're trying to call doesn't exist. Moving the arguments around isn't going to change that fact... because the function isn't there, there aren't any combination of arguments which would ever be valid. |