Skip to content

Commit

Permalink
Use Numpy numeric type for 'bool
Browse files Browse the repository at this point in the history
  • Loading branch information
ioanaif committed Feb 18, 2022
1 parent 14f5c83 commit 8c7d990
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/awkward/_v2/operations/structure/ak_full_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def full_like(array, fill_value, highlevel=True, behavior=None, dtype=None):
fill_value = dtype.type(fill_value)
# Also, if the fill_value cannot be converted to the dtype
# this should throw a clear, early, error.
if dtype is np.dtype(bool):
if dtype == np.dtype(np.bool_):
# then for bools, only 0 and 1 give correct string behavior
fill_value = int(fill_value)
fill_value = fill_value.view(np.uint8)

layout = ak._v2.operations.convert.to_layout(
array, allow_record=True, allow_other=False
Expand Down

0 comments on commit 8c7d990

Please sign in to comment.