Skip to content

Commit 30a5f3f

Browse files
authored
Merge pull request #1334 from jhlegarreta/FixNumpyCoreRenamed
RF: Use `numpy.lib.scimath` to demonstrate warning context manager
2 parents 0bd95cd + 3a7ceba commit 30a5f3f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nibabel/testing/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,10 @@ class clear_and_catch_warnings(warnings.catch_warnings):
150150
Examples
151151
--------
152152
>>> import warnings
153-
>>> with clear_and_catch_warnings(modules=[np.core.fromnumeric]):
153+
>>> with clear_and_catch_warnings(modules=[np.lib.scimath]):
154154
... warnings.simplefilter('always')
155-
... # do something that raises a warning in np.core.fromnumeric
155+
... # do something that raises a warning in np.lib.scimath
156+
... _ = np.arccos(90)
156157
"""
157158

158159
class_modules = ()

0 commit comments

Comments
 (0)