Python Forum
[split] np.arrange error - no attribute
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] np.arrange error - no attribute
#1
python3
Output:
Python 3.7.0 (default, Aug 18 2018, 20:37:25) [GCC 7.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import scipy as sp >>> t = sp.arange(1,10,.5) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'scipy' has no attribute 'arange' >>> import numpy as np >>> np.arange(3) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'numpy' has no attribute 'arange' >>>
I made sure to use single 'r' in arange for scipy and numpy. I am getting same error as no attribute 'arange' in numpy or scipy.

Just in continuation to my earlier post, it works fine for Python2. Pl see below.
python
Output:
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import scipy as sp >>> t = sp.arange(0,10,0.5) >>> import numpy as np >>> r = np.arange(3) >>>
Reply
#2
Split from https://python-forum.io/Thread-np-arrang...-attribute

Please don't post to old threads, that one had no activity for a year.
Reply
#3
You didn't happen to name your file numpy.py, did you? If so, it can "shadow" things.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] plt.style() in matplotlib causes error olufaruqu 4 1,156 May-12-2023, 01:41 PM
Last Post: olufaruqu
  Using SHAP Library for my LSTM model - "Attribute Error" vatsalmtailor 0 2,082 Jul-13-2022, 04:34 PM
Last Post: vatsalmtailor
  error "list object has no attribute transpose()" usercat123 4 4,259 Jan-28-2022, 12:01 PM
Last Post: usercat123
  Attribute Error Raiden_Arctica 4 4,129 Mar-13-2021, 11:09 AM
Last Post: Raiden_Arctica
  Attribute error in Dataframes deshanish 1 2,397 Jul-15-2020, 08:38 AM
Last Post: snippsat
  Attribute error - Sympy VictorG8 1 4,983 Apr-09-2020, 06:03 PM
Last Post: snippsat
  [pandas] How to re-arrange DataFrame columns SriMekala 8 4,906 Jun-22-2019, 12:55 AM
Last Post: scidam
  while creating a array using numpy.arrange, how to negate only the last 50 numbers? vicky53 1 2,677 Apr-06-2019, 11:52 AM
Last Post: scidam
  How to arrange the four pictures of a matplotlib.pyplot? vokoyo 0 2,770 Apr-04-2019, 10:58 PM
Last Post: vokoyo
  NLTK Download Attribute error laila1a 1 8,580 Jan-27-2019, 12:03 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020