Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove use of deprecated np.bool #225

Merged
merged 1 commit into from
Dec 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Ska/engarchive/derived/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ def fetch(self, start, stop):
data.vals = np.where(data.vals == 'OFF', np.int8(0), np.int8(1))

times, indexes = times_indexes(start, stop, self.time_step)
bads = np.zeros(len(times), dtype=np.bool) # All data OK (false)
bads = np.zeros(len(times), dtype=np.bool_) # All data OK (false)

for msidname, data in dataset.items():
# If no data are found in specified interval then stub two fake
# data points that are both bad. All interpolated points will likewise
# be bad.
if len(data) < 2:
data.vals = np.zeros(2, dtype=data.vals.dtype) # two null points
data.bads = np.ones(2, dtype=np.bool) # all points bad
data.bads = np.ones(2, dtype=np.bool_) # all points bad
data.times = np.array([times[0], times[-1]])
print('No data in {} between {} and {} (setting all bad)'
.format(msidname, DateTime(start).date, DateTime(stop).date))
Expand Down