code: def test_basic(self):
      for M, A_array in self.cases:
          A = interface.aslinearoperator(M)
          M, N = A.shape
  
          xs = [np.array([1, 2, 3]), np.array([[1], [2], [3]])]
          ys = [np.array([1, 2]), np.array([[1], [2]])]
  
          if A.dtype == np.complex_:
              xs += [np.array([1, 2j, 3j]), np.array([[1], [2j], [3j]])]
              ys += [np.array([1, 2j]), np.array([[1], [2j]])]
  
          x2 = np.array([[1, 4], [2, 5], [3, 6]])
  
          for x in xs:
              assert_equal(A.matvec(x), A_array.dot(x))
              assert_equal(A * x, A_array.dot(x))
  
          assert_equal(A.matmat(x2), A_array.dot(x2))
          assert_equal(A * x2, A_array.dot(x2))
  
          for y in ys:
              assert_equal(A.rmatvec(y), A_array.T.conj().dot(y))
              assert_equal(A.T.matvec(y), A_array.T.dot(y))
              assert_equal(A.H.matvec(y), A_array.T.conj().dot(y))
  
          for y in ys:
              if y.ndim < 2:
                  continue
              assert_equal(A.rmatmat(y), A_array.T.conj().dot(y))
              assert_equal(A.T.matmat(y), A_array.T.dot(y))
              assert_equal(A.H.matmat(y), A_array.T.conj().dot(y))
  
          if hasattr(M, "dtype"):
              assert_equal(A.dtype, M.dtype)
  
          assert_(hasattr(A, "args"))
  
imports: from functools import partial
  from itertools import product
  import operator
  import pytest
  from pytest import raises, warns
  from numpy.testing import assert_, assert_equal
  import numpy
  import scipy.sparse
  from scipy.sparse.linalg import interface
  from scipy.sparse.sputils import matrix
label_desc: Use image node_id 2 for calling the TestAsLinearOperator obj's underlying member method code with example usage: obj.test_basic() without return types