Posted on:

21 Nov 2022

0

Late 2022 numpy update

If someine uses dtype = np.str, listen to Jupiter Notebook:


DeprecationWarning: `np.str` is a deprecated alias for the builtin `str`. To silence this warning, use `str` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.str_` here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
  dtype = np.str)

Just change in to dtype = str, because there will be problems later, or just add "_" at the end (:

0 answers ( 0 marked as helpful)

Submit an answer