class_docstr: This is purely for onenormest testing.
class_docstr_tok: ["This","is","purely","for","onenormest","testing","."]
code: def __init__(self, A, B):
      if A.ndim != 2 or B.ndim != 2:
          raise ValueError("expected ndarrays representing matrices")
      if A.shape[1] != B.shape[0]:
          raise ValueError("incompatible shapes")
      self.A = A
      self.B = B
      self.ndim = 2
      self.shape = (A.shape[0], B.shape[1])
  
imports: from __future__ import division, print_function, absolute_import
  import numpy
  from numpy.testing import assert_allclose, assert_equal, assert_
  import pytest
  import scipy.linalg
  import scipy.sparse.linalg
  from scipy.sparse.linalg._onenormest import _onenormest_core, _algorithm_2_2
label_desc: Use image node_id 1 to create a new MatrixProductOperator object from inherited base classes: scipy.sparse.linalg with example: obj = MatrixProductOperator(A, B)