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.
()
| 452 | @set_module('numpy') |
| 453 | @contextlib.contextmanager |
| 454 | def _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) |
no outgoing calls
no test coverage detected