OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Jupyter Notebook - AttributeError: module 'numpy' has no attribute 'object' [closed]

  • Thread starter Thread starter phd_student8125
  • Start date Start date
P

phd_student8125

Guest
Keep getting this problem in Jupyter notebook, doesn't happen with command run.

Happens when I try to import keras, or tensorflow.

Here are the commands I tried to run (happens for both):

Code:
import keras

or

Code:
from tensorflow import keras

Here is the error: AttributeError: module 'numpy' has no attribute 'object'. np.object was a deprecated alias for the builtin object. To avoid this error in existing code, use object by itself. Doing this will not modify any behavior and is safe. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Help.

here are my current versions: tensorflow -2.16.1 python - 3.11.4 numpy - 1.23.5

Searched the forums and tried to change Python versions, tensorflow or numpy versions - nothing seems to work.

Tried ignoring the error, doesn't work either.
<p>Keep getting this problem in Jupyter notebook, doesn't happen with command run.</p>
<p>Happens when I try to import keras, or tensorflow.</p>
<p>Here are the commands I tried to run (happens for both):</p>
<pre><code>import keras
</code></pre>
<p>or</p>
<pre><code>from tensorflow import keras
</code></pre>
<p>Here is the error:
AttributeError: module 'numpy' has no attribute 'object'.
<code>np.object</code> was a deprecated alias for the builtin <code>object</code>. To avoid this error in existing code, use <code>object</code> by itself. Doing this will not modify any behavior and is safe.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
<a href="https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations" rel="nofollow noreferrer">https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations</a></p>
<p>Help.</p>
<p>here are my current versions:
tensorflow -2.16.1
python - 3.11.4
numpy - 1.23.5</p>
<p>Searched the forums and tried to change Python versions, tensorflow or numpy versions - nothing seems to work.</p>
<p>Tried ignoring the error, doesn't work either.</p>
 

Latest posts

I
Replies
0
Views
1
Ihsan Sadat
I
Top