numpy.testing.assert_#

testing.assert_(val, msg='')[source]#

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

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.