Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
np.arrange error - no attribute
#1
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.
Quote
#2
Use code tags
Quote
#3
Numpy has arange() function, not arrange(). Your examples should be like
pp = np.arange(10)
Quote
#4
(Jul-01-2017, 12:44 PM)pksherard Wrote: all commands give error:
AttributeError: 'module' object has no attribute 'arrange'
Tried many other combinations for argument, no luck.

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.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Please help me error "AttributeError: 'module' object has no attribute 'ElementTree'" mattroi261192 4 165 Nov-11-2018, 05:01 AM
Last Post: mattroi261192
  Error ' Attribute error: 'str' object has no attribute 'items'' in pyinstaller manhnt 2 239 Nov-04-2018, 05:51 PM
Last Post: Larz60+
  AttributeError: '' object has no attribute '' Santhosh198915 6 266 Oct-19-2018, 10:33 AM
Last Post: Santhosh198915
  Tuple no attribute error oldcity 3 198 Oct-06-2018, 05:37 PM
Last Post: snippsat
  Help to arrange correct input array structure mogensen24 1 155 Oct-05-2018, 06:09 PM
Last Post: j.crater
  identifying a dictionary with an attribute? Skaperen 7 197 Oct-04-2018, 05:48 AM
Last Post: Skaperen
  .pyplot has not attribute zlim SchroedingersLion 5 354 Aug-25-2018, 01:31 PM
Last Post: SchroedingersLion
  Fatal Python error: init_sys_streams: can't initialize sys standard streams Attribute FatalPythonError 24 1,853 Aug-22-2018, 06:10 PM
Last Post: FatalPythonError
  [split] np.arrange error - no attribute gyan 2 400 Aug-19-2018, 05:38 PM
Last Post: micseydel
  Error object has no attribute text hcyeap 1 711 Aug-13-2018, 01:07 PM
Last Post: snippsat

Forum Jump:


Users browsing this thread: 1 Guest(s)