diff --git a/src/awkward/contents/emptyarray.py b/src/awkward/contents/emptyarray.py index e2edce2672..775d757f09 100644 --- a/src/awkward/contents/emptyarray.py +++ b/src/awkward/contents/emptyarray.py @@ -98,7 +98,7 @@ def __deepcopy__(self, memo): def __array__(self, dtype=None): deprecate( - f"np.asarray(content) is deprecated for {type(self)}. Use ak.to_numpy(content) instead", + f"np.asarray(content) is deprecated for {type(self).__name__}. Use ak.to_numpy(content) instead", version="2.6.0", ) return numpy.empty(0, dtype=dtype) diff --git a/src/awkward/contents/numpyarray.py b/src/awkward/contents/numpyarray.py index 787e01e801..1b39cc822b 100644 --- a/src/awkward/contents/numpyarray.py +++ b/src/awkward/contents/numpyarray.py @@ -154,7 +154,7 @@ def __deepcopy__(self, memo): def __array__(self, dtype=None): deprecate( - f"np.asarray(content) is deprecated for {type(self)}. Use ak.to_numpy(content) instead", + f"np.asarray(content) is deprecated for {type(self).__name__}. Use ak.to_numpy(content) instead", version="2.6.0", ) return numpy.asarray(self._data, dtype=dtype)