def matrix_tensor_product(*product):
 if isinstance(product[0], Matrix):
  return _sympy_tensor_product(*product)
 elif isinstance(product[0], numpy_ndarray):
  return _numpy_tensor_product(*product)
 elif isinstance(product[0], scipy_sparse_matrix):
  return _scipy_sparse_tensor_product(*product)

def matrix_tensor_product ( * product ) : if isinstance ( product [ 0 ] , Matrix ) : return _sympy_tensor_product ( * product ) elif isinstance ( product [ 0 ] , numpy_ndarray ) : return _numpy_tensor_product ( * product ) elif isinstance ( product [ 0 ] , scipy_sparse_matrix ) : return _scipy_sparse_tensor_product ( * product )
compute the matrix tensor product of sympy/numpy/scipy .