MCPcopy Create free account
hub / github.com/numpy/numpy / _no_nep50_warning

Function _no_nep50_warning

numpy/core/_ufunc_config.py:454–466  ·  view source on GitHub ↗

Context manager to disable NEP 50 warnings. This context manager is only relevant if the NEP 50 warnings are enabled globally (which is not thread/context safe). This warning context manager itself is fully safe, however.

()

Source from the content-addressed store, hash-verified

452@set_module('numpy')
453@contextlib.contextmanager
454def _no_nep50_warning():
455 """
456 Context manager to disable NEP 50 warnings. This context manager is
457 only relevant if the NEP 50 warnings are enabled globally (which is not
458 thread/context safe).
459
460 This warning context manager itself is fully safe, however.
461 """
462 token = NO_NEP50_WARNING.set(True)
463 try:
464 yield
465 finally:
466 NO_NEP50_WARNING.reset(token)

Callers 3

_meanFunction · 0.90
_varFunction · 0.90
within_tolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected