You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / testing / _private / utils / assert_

function

numpy.testing._private.utils:assert_

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

Signature

def   assert_ ( val msg = '' )

Summary

Assert that works in release mode. Accepts callable msg to allow deferring evaluation until failure.

Extended Summary

The Python built-in assert does not work when executing code in optimized mode (the -O flag) - no byte-code is generated for it.

For documentation on usage, refer to the Python documentation.

Aliases

  • numpy.testing.assert_