MCPcopy Create free account
hub / github.com/dask/dask / assert_scipy_sparse_matrix_deprecated

Function assert_scipy_sparse_matrix_deprecated

dask/utils_test.py:182–192  ·  view source on GitHub ↗

Context manager that conditionally checks for the SciPy sparse matrix deprecation warning.

(extra_condition: bool = True)

Source from the content-addressed store, hash-verified

180
181
182def assert_scipy_sparse_matrix_deprecated(extra_condition: bool = True):
183 """Context manager that conditionally checks for the SciPy sparse matrix deprecation
184 warning.
185 """
186 from dask.array.scipy_compat import SCIPY_GE_200
187
188 return _check_warning(
189 extra_condition and SCIPY_GE_200,
190 DeprecationWarning,
191 "is being replaced by",
192 )

Calls 1

_check_warningFunction · 0.85

Tested by

no test coverage detected