diff options
Diffstat (limited to 'fix_deprecation_warning.patch')
-rw-r--r-- | fix_deprecation_warning.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/fix_deprecation_warning.patch b/fix_deprecation_warning.patch new file mode 100644 index 000000000000..08831a9bacb2 --- /dev/null +++ b/fix_deprecation_warning.patch @@ -0,0 +1,27 @@ +--- a/astropy_healpix/core.py 2018-12-19 03:23:52.000000000 +0800 ++++ b/astropy_healpix/core.py 2019-02-23 19:07:17.514787248 +0800 +@@ -38,9 +38,9 @@ + return args[0].reshape(shape) + else: + if len(args) > 1: +- return [np.asscalar(arg) for arg in args] ++ return [arg.item() for arg in args] + else: +- return np.asscalar(args[0]) ++ return args[0].item() + + + def _validate_order(order): +--- a/astropy_healpix/healpy.py 2018-12-19 03:23:52.000000000 +0800 ++++ b/astropy_healpix/healpy.py 2019-02-23 19:11:40.427182742 +0800 +@@ -121,8 +121,8 @@ + theta, phi = vec2ang(np.transpose([x, y, z])) + # hp.vec2ang() returns raveled arrays, which are 1D. + if np.isscalar(x): +- theta = np.asscalar(theta) +- phi = np.asscalar(phi) ++ theta = theta.item() ++ phi = phi.item() + else: + shape = np.shape(x) + theta = theta.reshape(shape) |