MCPcopy Index your code
hub / github.com/numpy/numpy / warn_other_module

Function warn_other_module

numpy/testing/tests/test_utils.py:1818–1824  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1816 assert_equal(getattr(my_mod, '__warningregistry__', {}), {})
1817
1818 def warn_other_module():
1819 # Apply along axis is implemented in python; stacklevel=2 means
1820 # we end up inside its module, not ours.
1821 def warn(arr):
1822 warnings.warn("Some warning 2", stacklevel=2)
1823 return arr
1824 np.apply_along_axis(warn, 0, [0])
1825
1826 # Test module based warning suppression:
1827 assert_warn_len_equal(my_mod, 0)

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…