<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def matrix_is_equivalent(X, Y):
 """ Checks matrix equivalence with numpy, scipy and pandas """

    return X is Y or (isinstance(X, Y.__class__) and X.shape == Y.shape and
                      np.sum((X != Y).sum()) == 0)