def dot_shape_from_shape(x, y):
 if isinstance(x, LinearTransform):
  if (type(y) != tuple):
   raise TypeError('y should be tuple', y)
  return (x.col_shape() + x.split_right_shape(y, False)[1])
 elif isinstance(y, LinearTransform):
  if (type(x) != tuple):
   raise TypeError('x should be tuple', x)
  return (y.split_left_shape(x, False)[0] + y.row_shape())
 else:
  raise TypeError('One of x or y should be a LinearTransform')

def dot_shape_from_shape ( x , y ) : if isinstance ( x , LinearTransform ) : if ( type ( y ) != tuple ) : raise TypeError ( 'y should be tuple' , y ) return ( x . col_shape ( ) + x . split_right_shape ( y , False ) [ 1 ] ) elif isinstance ( y , LinearTransform ) : if ( type ( x ) != tuple ) : raise TypeError ( 'x should be tuple' , x ) return ( y . split_left_shape ( x , False ) [ 0 ] + y . row_shape ( ) ) else : raise TypeError ( 'One of x or y should be a LinearTransform' )
compute dot .