Skip to content

Commit

Permalink
np.bool is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpope committed Sep 1, 2024
1 parent 31e45df commit 2e1ff6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dtdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DtData(object):
def __init__(self, flux, inputs, mask=None):
self._flux = array(flux)
self._inputs = array(inputs)
self._mask = array(mask) if mask is not None else ones(self._flux.size, np.bool)
self._mask = array(mask) if mask is not None else ones(self._flux.size, bool)
self._fm, self._fs = medsig(self.masked_flux)
self.nptm = self.masked_flux.size
self.nptu = self.unmasked_flux.size
Expand Down Expand Up @@ -108,7 +108,7 @@ def mask(self, mask):
mask = array(mask)
assert mask.ndim == 1, 'The mask array for DtData should be 1D'
assert mask.size == self.flux.size, 'The mask array for DtData should have the same size as the flux array'
assert mask.dtype == np.bool, 'The mask array should be boolean'
assert mask.dtype == bool, 'The mask array should be boolean'
self._mask = mask

@property
Expand Down

0 comments on commit 2e1ff6c

Please sign in to comment.