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
Convert a numpy zero matrix to the zero scalar.
dataset/ETHPy150Open sympy/sympy/sympy/physics/quantum/matrixutils.py/_numpy_matrix_to_zero