예제 #1
0
 def _delay_transpose(self, pre_post, op):
     assert len(pre_post) in (0, 1, 2)
     if len(pre_post) is 0:
         return op
     elif len(pre_post) is 1:
         return DelayedTranspose(pre_post[0]) * op
     else:
         return DelayedTranspose(pre_post[0]) * op * pre_post[1]
예제 #2
0
 def __mul__(self, other):
     delayed_transpose = DelayedTranspose(
         self.basis_functions_matrix)
     return delayed_transpose * other
예제 #3
0
def transpose(arg):
    return DelayedTranspose(arg)