Closed ZipFile closed 5 years ago
@ZipFile : Do you know which version of Numpy ndarray.item was introduced?
Looking at it, it is here since a while: https://docs.scipy.org/doc/numpy-1.3.x/reference/generated/numpy.ndarray.item.html#numpy.ndarray.item, I will merge this one as it looks quite safe.
Not sure when it was introduced, but:
def asscalar(a):
return a.item()
asscalar
was implemented like this since forever (https://github.com/numpy/numpy/commit/65d5f7fc7378e7d8a05125c667ae933b7a6c040f or https://github.com/numpy/numpy/commit/54a193f1a0cdd6ccf40e36d09daa9fb0dd658456 before ndarray.toscalar
-> ndarray.item
rename). They moved it around over time and now decided to deprecate. So this PR is about removing annoying warning.
numpy.asscalar function is deprecated since NumPy v1.16
See: https://docs.scipy.org/doc/numpy-1.16.0/release.html#new-deprecations