Skip to content

Commit

Permalink
MAINT: rm old warning
Browse files Browse the repository at this point in the history
* if you believe the comments that this warning suppression
should be safe to remove after `1.16`, then it should
be safe to remove now?
  • Loading branch information
tylerjereddy committed Jul 16, 2022
1 parent bdec321 commit 7ed9776
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions numpy/lib/recfunctions.py
Expand Up @@ -13,7 +13,6 @@
from numpy.ma.mrecords import MaskedRecords
from numpy.core.overrides import array_function_dispatch
from numpy.lib._iotools import _is_string_like
from numpy.testing import suppress_warnings

_check_fill_value = np.ma.core._check_fill_value

Expand Down Expand Up @@ -971,9 +970,7 @@ def structured_to_unstructured(arr, dtype=None, copy=False, casting='unsafe'):
'formats': dts,
'offsets': offsets,
'itemsize': arr.dtype.itemsize})
with suppress_warnings() as sup: # until 1.16 (gh-12447)
sup.filter(FutureWarning, "Numpy has detected")
arr = arr.view(flattened_fields)
arr = arr.view(flattened_fields)

# next cast to a packed format with all fields converted to new dtype
packed_fields = np.dtype({'names': names,
Expand Down

0 comments on commit 7ed9776

Please sign in to comment.