{ } Raw JSON

bundles / numpy 2.4.4 / numpy / testing / _private / utils / assert_no_warnings

function

numpy.testing._private.utils:assert_no_warnings

source: /numpy/testing/_private/utils.py :2069

Signature

def   assert_no_warnings ( * args ** kwargs )

Summary

Fail if the given callable produces any warnings.

Extended Summary

If called with all arguments omitted, may be used as a context manager

with assert_no_warnings():
    do_something()

The ability to be used as a context manager is new in NumPy v1.11.0.

Parameters

func : callable

The callable to test.

\*args : Arguments

Arguments passed to func.

\*\*kwargs : Kwargs

Keyword arguments passed to func.

Returns

: The value returned by `func`.

Aliases

  • numpy.testing.assert_no_warnings