Skip to content

Commit

Permalink
remove np.bool
Browse files Browse the repository at this point in the history
  • Loading branch information
dstndstn committed Dec 19, 2022
1 parent 3ccba5d commit 5e930b1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.92-1-g016231fd'
__version__ = '0.92-2-g3ccba5d7'
2 changes: 1 addition & 1 deletion sdss/dr7.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def getInvvar(self, fpC, fpM, gain, darkvar, sky, skyerr,
ivarimg = 1./((img + sky) / gain + darkvar + skyerr)

if invvar_and_mask:
mask = np.ones(ivarimg.shape, np.bool)
mask = np.ones(ivarimg.shape, bool)
maskimg = mask
else:
maskimg = ivarimg
Expand Down
8 changes: 3 additions & 5 deletions util/fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def cut_array(val, I, name=None, to=None):

# HACK -- emulate numpy's boolean and int array slicing
# (when "val" is a normal python list)
if type(I) is np.ndarray and hasattr(I, 'dtype') and ((I.dtype.type in [bool, np.bool])
if type(I) is np.ndarray and hasattr(I, 'dtype') and ((I.dtype.type in [bool, np.bool_])
or (I.dtype == bool)):
try:
if to is None:
Expand Down Expand Up @@ -555,11 +555,9 @@ def to_fits_columns(self, columns=None):
np.float32:'E',
np.int32:'J',
np.int64:'K',
np.uint8:'B', #
np.uint8:'B',
np.int16:'I',
#np.bool:'X',
#np.bool_:'X',
np.bool:'L',
#np.bool:'L',
np.bool_:'L',
np.string_:'A',
}
Expand Down

0 comments on commit 5e930b1

Please sign in to comment.