Skip to content

Commit

Permalink
Merge pull request #136 from mcara/fix-bitmask-dtype-np1p21compat
Browse files Browse the repository at this point in the history
Improve bitmask compatibility with numpy 1.21
  • Loading branch information
pllim committed Aug 11, 2021
2 parents b00470b + f890f2f commit 39c4793
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ of the list).

- ``astropy`` 2 or later is now required. [#121]

- Improved compatibility of the ``bitmask`` module with ``numpy 1.21``. [#136]

3.6.0 (2019-07-17)
------------------

Expand Down
2 changes: 1 addition & 1 deletion lib/stsci/tools/bitmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ def bitfield_to_boolean_mask(bitfield, ignore_flags=0, flip_bits=None,
ignore_mask = ignore_mask & SUPPORTED_FLAGS

# invert the "ignore" mask:
ignore_mask = np.bitwise_not(ignore_mask, dtype=bitfield.dtype,
ignore_mask = np.bitwise_not(ignore_mask, dtype=bitfield.dtype.type,
casting='unsafe')

mask = np.empty_like(bitfield, dtype=np.bool_)
Expand Down

0 comments on commit 39c4793

Please sign in to comment.