u = vector(QQ, [1/2, 1/3, 1/4, 1/5]) v = vector(ZZ, [60, 180, 600]) u.outer_product(v),v.outer_product(u),u.tensor_product(v),v.tensor_product(u)
(
[ 30 90 300] [ 30 90 300]
[ 20 60 200] [ 30 20 15 12] [ 20 60 200] [ 30 20 15 12]
[ 15 45 150] [ 90 60 45 36] [ 15 45 150] [ 90 60 45 36]
[ 12 36 120], [300 200 150 120], [ 12 36 120], [300 200 150 120]
)
above are two vectors'tensor_product,but when use two mudules,cannot run....
M=FreeModule(ZZ,3);M N=FreeModule(ZZ,7);N M.outer_product(N),M.tensor_product(N)
AttributeError Traceback (most recent call last) <ipython-input-1-ad4483c60043> in <module>() 1 M=FreeModule(ZZ,Integer(3));M 2 N=FreeModule(ZZ,Integer(7));N ----> 3 M.outer_product(N),M.tensor_product(N)
/home/sageserver/sage/local/lib/python2.7/site-packages/sage/structure/parent.so in sage.structure.parent.Parent.__getattr__ (build/cythonized/sage/structure/parent.c:7367)()
/home/sageserver/sage/local/lib/python2.7/site-packages/sage/structure/misc.so in sage.structure.misc.getattr_from_other_class (build/cythonized/sage/structure/misc.c:1687)()
AttributeError: 'FreeModule_ambient_pid_with_category' object has no attribute 'outer_product'