bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / testing / _private / utils / suppress_warnings / record
function
numpy.testing._private.utils:suppress_warnings.record
source: build-install/usr/lib/python3.14/site-packages/numpy/testing/_private/utils.py :2435
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