Wrong description in the documentation.
On Monday, 19 June 2017 12:27:28 UTC-4, ric wrote:
>
> Dear developers of module tensor
>
> the documentation of tensor_indices (in 1.00 as well as in dev) seems
> inconsistent with the code:
>
> DOC string [1] states:
> Returns list of tensor indices given their names and their types
> ...
> typ : list of ``TensorIndexType`` of the indices
>
> while CODE [2] states
>
> tilist = [TensorIndex(i, typ) for i in a]
>
> hence this will not work as promized if typ is a list.
>
> Example:
> from sympy.tensor.tensor import TensorIndexType, tensor_indices
> Lorentz = TensorIndexType('Lorentz', dummy_fmt='L')
> Lor2 = TensorIndexType('Lor2', dummy_fmt='L')
> a, b, c, d = tensor_indices('a,b,c,d', [Lorentz,Lor2,Lor2,Lor2])
> a.tensortype
>
> results in
>
> [TensorIndexType(Symbol('Lorentz'), Integer(0)),
> TensorIndexType(Symbol('Lor2'), Integer(0)),
> TensorIndexType(Symbol('Lor2'), Integer(0)),
> TensorIndexType(Symbol('Lor2'), Integer(0))]
>
> Best regards and thanks for your effort.
> ric
>
> PS I take the occasion to say that as newbie user I find the naming
> conventions for the helper functions tensorsymmetry and tensorhead
> difficult to memorize because inconsistent with tensor_indices (and python
> usual conventions). You might want to rename the former helpers to
> tensor_symmetry and tensor_heads (plural)
>
> [1]
> https://github.com/sympy/sympy/blob/master/sympy/tensor/tensor.py#L1888
> [1]
> https://github.com/sympy/sympy/blob/master/sympy/tensor/tensor.py#L1902
>
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/79fe13fb-38c7-47db-8344-b296fc2ca446%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.