diff options
author | Universebenzene | 2019-02-23 19:50:01 +0800 |
---|---|---|
committer | Universebenzene | 2019-02-23 19:50:01 +0800 |
commit | 6a24e2c81758dda2ad48c98e6f9afce3aaec3be9 (patch) | |
tree | 205292bea52903226c50597cb77efede00136bc6 /fix_deprecation_warning.patch | |
parent | 55f6f4ffd4a276ac7f598374e7562fbf08d903d7 (diff) | |
download | aur-6a24e2c81758dda2ad48c98e6f9afce3aaec3be9.tar.gz |
Fix DeprecationWarning
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) |