Skip to content

Commit

Permalink
Merge pull request #1334 from jhlegarreta/FixNumpyCoreRenamed
Browse files Browse the repository at this point in the history
RF: Use `numpy.lib.scimath` to demonstrate warning context manager
  • Loading branch information
effigies authored Jun 28, 2024
2 parents 0bd95cd + 3a7ceba commit 30a5f3f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nibabel/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,10 @@ class clear_and_catch_warnings(warnings.catch_warnings):
Examples
--------
>>> import warnings
>>> with clear_and_catch_warnings(modules=[np.core.fromnumeric]):
>>> with clear_and_catch_warnings(modules=[np.lib.scimath]):
... warnings.simplefilter('always')
... # do something that raises a warning in np.core.fromnumeric
... # do something that raises a warning in np.lib.scimath
... _ = np.arccos(90)
"""

class_modules = ()
Expand Down

0 comments on commit 30a5f3f

Please sign in to comment.