aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-11-03 13:38:08 +0800
committerAaron LI <aly@aaronly.me>2017-11-03 13:38:08 +0800
commite25e0d95600b548f2237163e8fd88b219397fca4 (patch)
tree2587f9b848a686df3c1124387fddf58fc1835e63 /fg21sim/utils
parent7a88ee0ecbc74ece326249c90ecb170f087be2d0 (diff)
downloadfg21sim-e25e0d95600b548f2237163e8fd88b219397fca4.tar.bz2
Deprecate np.int, np.float
See: https://github.com/numpy/numpy/pull/6103
Diffstat (limited to 'fg21sim/utils')
-rw-r--r--fg21sim/utils/reproject.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/fg21sim/utils/reproject.py b/fg21sim/utils/reproject.py
index 8b3d34f..f244246 100644
--- a/fg21sim/utils/reproject.py
+++ b/fg21sim/utils/reproject.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 Weitian LI <liweitianux@live.com>
+# Copyright (c) 2016-2017 Weitian LI <weitian@aaronly.me>
# MIT license
"""
@@ -129,7 +129,7 @@ def _image_to_healpix(image, wcs, nside, order=1, hemisphere=None):
raise ValueError("invalid hemisphere: {0}".format(hemisphere))
#
npix = hp.nside2npix(nside)
- hpidx = np.arange(npix).astype(np.int)
+ hpidx = np.arange(npix, dtype=int)
logger.info("Output HEALPix: Nside={0}, Npixel={1}".format(nside, npix))
# Calculate the longitude and latitude in frame of output HEALPix
logger.info("Calculate the longitudes and latitudes on the HEALPix grid")
@@ -288,7 +288,7 @@ def zea2healpix(img1, img2, nside, order=1, inpaint=False,
# Merge the two HEALPix data
hp_nan1 = np.isnan(hp_data1)
hp_nan2 = np.isnan(hp_data2)
- hp_mask = (~hp_nan1).astype(np.int) + (~hp_nan2).astype(np.int)
+ hp_mask = (~hp_nan1).astype(int) + (~hp_nan2).astype(int)
hp_data1[hp_nan1] = 0.0
hp_data2[hp_nan2] = 0.0
hp_data = hp_data1 + hp_data2