Skip to content

Commit

Permalink
Use base of dtype in set_nan_defaults (#960)
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx authored Jan 23, 2025
1 parent 042eb11 commit 0aa7920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion strax/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def set_nan_defaults(buffer):
"""When constructing the dtype, take extra care to set values to np.Nan / -1 (for ints) as 0
might have a meaning."""
for field in buffer.dtype.names:
if np.issubdtype(buffer.dtype[field], np.integer):
if np.issubdtype(buffer.dtype[field].base, np.integer):
buffer[field][:] = -1
else:
buffer[field][:] = np.nan
Expand Down

0 comments on commit 0aa7920

Please sign in to comment.