opt/conda/lib/python3.10/site-packages/mxnet/numpy/utils.py:37: FutureWarning: In the…
Private research annotation
Sign in to add a private research label or note.
- User
opt/conda/lib/python3.10/site-packages/mxnet/numpy/utils.py:37: FutureWarning: In the future
np.boolwill be defined as the corresponding NumPy scalar. bool = onp.boolAttributeError Traceback (most recent call last) Cell In[4], line 1 ----> 1 from mxnet import autograd, nd, gluon, init 2 from mxnet.gluon import loss as gloss 3 from mxnet.gluon import daata as gdata
File /opt/conda/lib/python3.10/site-packages/mxnet/init.py:33 30 # version info 31 version = base.version ---> 33 from . import contrib 34 from . import ndarray 35 from . import ndarray as nd
File /opt/conda/lib/python3.10/site-packages/mxnet/contrib/init.py:30 27 from . import autograd 28 from . import tensorboard ---> 30 from . import text 31 from . import onnx 32 from . import io
File /opt/conda/lib/python3.10/site-packages/mxnet/contrib/text/init.py:23 21 from . import utils 22 from . import vocab ---> 23 from . import embedding
File /opt/conda/lib/python3.10/site-packages/mxnet/contrib/text/embedding.py:36 34 from ... import base 35 from ...util import is_np_array ---> 36 from ... import numpy as _mx_np 37 from ... import numpy_extension as _mx_npx 40 def register(embedding_cls):
File /opt/conda/lib/python3.10/site-packages/mxnet/numpy/init.py:23 21 from . import random 22 from . import linalg ---> 23 from .multiarray import * # pylint: disable=wildcard-import 24 from . import _op 25 from . import _register
File /opt/conda/lib/python3.10/site-packages/mxnet/numpy/multiarray.py:47 45 from ..ndarray.numpy import _internal as _npi 46 from ..ndarray.ndarray import _storage_type, from_numpy ---> 47 from .utils import _get_np_op 48 from .fallback import * # pylint: disable=wildcard-import,unused-wildcard-import 49 from . import fallback
File /opt/conda/lib/python3.10/site-packages/mxnet/numpy/utils.py:37 35 int64 = onp.int64 36 bool_ = onp.bool_ ---> 37 bool = onp.bool 39 pi = onp.pi 40 inf = onp.inf
File /opt/conda/lib/python3.10/site-packages/numpy/init.py:324, in getattr(attr) 319 warnings.warn( 320 f"In the future
np.{attr}will be defined as the " 321 "corresponding NumPy scalar.", FutureWarning, stacklevel=2) 323 if attr in former_attrs: --> 324 raise AttributeError(former_attrs[attr]) 326 if attr == 'testing': 327 import numpy.testing as testingAttributeError: module 'numpy' has no attribute 'bool'.
np.boolwas a deprecated alias for the builtinbool. To avoid this error in existing code, useboolby itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: - Assistant
The error you are encountering is due to incompatible use of
np.bool, which has been deprecated in favor ofboolfor general use ornp.bool_for NumPy's boolean type. This is a result of the Python package you are using (in this case, MXNet) not yet updating its codebase to comply with the recent NumPy update that deprecated .