ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 07 Oct 2014 13:57:17 +0200Generation of all 3-index tensors with {-1,0,1} as entries.https://ask.sagemath.org/question/24417/generation-of-all-3-index-tensors-with-101-as-entries/ I need to generate all tensors $A_{ijk}$ (i.e. array with 3 indices), where $i=0, \ldots, 6$, $j=0, \ldots 6$, $k=0, \ldots 5$, such that only integer numbers $-1$, $0$ and $1$ could be used as entries. There are $6*6*5*3$ such possibilities. What would be the shortest system of embedded loop for this in SAGE? I just started using SAGE and don't have any previous experience with Python. The only solution I was able to think of include hundreds of embedded loops. IraTue, 07 Oct 2014 13:57:17 +0200https://ask.sagemath.org/question/24417/