bundles / numpy 2.4.4 / numpy / testing / _private / utils / suppress_warnings / record
function
numpy.testing._private.utils:suppress_warnings.record
Signature
def record ( self , category = <class 'Warning'> , message = '' , module = None ) Summary
Append a new recording filter or apply it if the state is entered.
Extended Summary
All warnings matching will be appended to the log attribute.
Parameters
category: class, optionalWarning class to filter
message: string, optionalRegular expression matching the warning message.
module: module, optionalModule 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.
Returns
log: listA list which will be filled with all matched warnings.
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.record