File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1332,16 +1332,16 @@ def hadamard_product(self, other):
1332
1332
from sage .modules .free_module_element import vector
1333
1333
P = self .parent ()
1334
1334
1335
+ def tensor_product (left , right ):
1336
+ T = left .tensor_product (right )
1337
+ T .subdivide ()
1338
+ return T
1335
1339
result = P .element_class (
1336
1340
P ,
1337
- dict ((a ,
1338
- Matrix (tuple (
1339
- srow .outer_product (orow ).list ()
1340
- for srow in self .mu [a ].rows ()
1341
- for orow in other .mu [a ].rows ())))
1341
+ dict ((a , tensor_product (self .mu [a ], other .mu [a ]))
1342
1342
for a in P .alphabet ()),
1343
- vector (self .left . outer_product (other .left ). list ( )),
1344
- vector (self .right . outer_product (other .right ). list ( )))
1343
+ vector (tensor_product ( Matrix ( self .left ), Matrix (other .left ))),
1344
+ vector (tensor_product ( Matrix ( self .right ), Matrix (other .right ))))
1345
1345
1346
1346
return result
1347
1347
You can’t perform that action at this time.
0 commit comments