Skip to content

Commit

Permalink
Merge pull request #901 from CoffeaTeam/fix-numpy-bool
Browse files Browse the repository at this point in the history
fix: remove use of deprecated numpy.bool
  • Loading branch information
lgray authored Oct 4, 2023
2 parents 0633ad4 + 9035385 commit 18fb743
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coffea/analysis_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def add(self, name, selection, fill_value=False):
selection = coffea.util._ensure_flat(selection, allow_missing=True)
if isinstance(selection, numpy.ma.MaskedArray):
selection = selection.filled(fill_value)
if selection.dtype != numpy.bool:
if selection.dtype != bool:
raise ValueError(f"Expected a boolean array, received {selection.dtype}")
if len(self._names) == 0:
self._data = numpy.zeros(len(selection), dtype=self._dtype)
Expand Down

0 comments on commit 18fb743

Please sign in to comment.