def is_scipy_sparse(arr):
global _is_scipy_sparse<EOL>if _is_scipy_sparse is None:<EOL><INDENT>try:<EOL><INDENT>from scipy.sparse import issparse as _is_scipy_sparse<EOL><DEDENT>except ImportError:<EOL><INDENT>_is_scipy_sparse = lambda _: False<EOL><DEDENT><DEDENT>return _is_scipy_sparse(arr)<EOL>
Check whether an array-like is a scipy.sparse.spmatrix instance.

Parameters
----------
arr : array-like
    The array-like to check.

Returns
-------
boolean
    Whether or not the array-like is a scipy.sparse.spmatrix instance.

Notes
-----
If scipy is not installed, this function will always return False.

Examples
--------
>>> from scipy.sparse import bsr_matrix
>>> is_scipy_sparse(bsr_matrix([1, 2, 3]))
True
>>> is_scipy_sparse(pd.SparseArray([1, 2, 3]))
False
>>> is_scipy_sparse(pd.SparseSeries([1, 2, 3]))
False