[Numpy-discussion] permutation symbol
Charles R Harris
Tue Jun 30 15:17:52 CDT 2009
On Tue, Jun 30, 2009 at 2:02 PM, David Goldsmith <firstname.lastname@example.org>wrote:
> No, but my guess is that it might be useful in numerical General
> Relativity, e.g., as well as pedagogically in teaching differential geometry
> and tensor algebra.
It shouldn't be difficult to generate all the permutations of the indices
and assign +/-1 as appropriate. The rest of the entries would be zero. There
was a discussion about generating permutations a while back... Hmm, using
one of the recursive routines it looks like it shouldn't be too difficult to
track even and odd permutations. But for general relativity, four indices
with four values, it would probably be quickest to just write down the 24
permutations and use a singleton array, i.e., generate the array once and
just return references or copies.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion