(x)
Eliminate zeros from sparse matrix, or raise appropriate warning.
Eliminate zeros from sparse matrix, or raise appropriate warning.
Eliminate zeros from sparse matrix or raise appropriate warning .
def _eliminate_zeros(x):
    """Eliminate zeros from sparse matrix, or raise appropriate warning."""
    if hasattr(x, "eliminate_zeros"):
        x.eliminate_zeros()
    else:
        warnings.warn(
            f"`{x.__type__}` does not implement `eliminate_zeros`. Some values "
            f"in the sparse matrix may by explicit zeros."
        )
def _eliminate_zeros ( x ) : if hasattr ( x , "eliminate_zeros" ) : x . eliminate_zeros ( ) else : warnings . warn ( f"`{x.__type__}` does not implement `eliminate_zeros`. Some values " f"in the sparse matrix may by explicit zeros." )