This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / testing / _private / utils / suppress_warnings / filter

function

numpy.testing._private.utils:suppress_warnings.filter

source: build-install/usr/lib/python3.14/site-packages/numpy/testing/_private/utils.py :2412

Signature

def   filter ( self category = <class 'Warning'> message = '' module = None )

Summary

Add a new suppressing filter or apply it if the state is entered.

Parameters

category : class, optional

Warning class to filter

message : string, optional

Regular expression matching the warning message.

module : module, optional

Module to filter for. Note that the module (and its file) must match exactly and cannot be a submodule. This may make it unreliable for external modules.

Notes

When added within a context, filters are only added inside the context and will be forgotten when the context is exited.

Aliases

  • numpy.testing.suppress_warnings.filter