(e)
Convert a numpy zero matrix to the zero scalar.
Convert a numpy zero matrix to the zero scalar.
Convert a numpy zero matrix to the zero scalar .
def _numpy_matrix_to_zero(e):
    """Convert a numpy zero matrix to the zero scalar."""
    if not np:
        raise ImportError
    test = np.zeros_like(e)
    if np.allclose(e, test):
        return 0.0
    else:
        return e
def _numpy_matrix_to_zero ( e ) : if not np : raise ImportError test = np . zeros_like ( e ) if np . allclose ( e , test ) : return 0.0 else : return e