suppress_warnings.record(category=<class 'Warning'>, message='', module=None)
[source]
Append a new recording filter or apply it if the state is entered.
All warnings matching will be appended to the log
attribute.
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. |
---|---|
Returns: |
log : list A list which will be filled with all matched warnings. |
When added within a context, filters are only added inside the context and will be forgotten when the context is exited.
© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.14.2/reference/generated/numpy.testing.suppress_warnings.record.html