COMPAT: Add np.linalg.matrix_rank for <= 1.7.1