https://github.com/sympy/sympy/pull/12778
On Tuesday, 20 June 2017 11:30:42 UTC-4, Francesco Bonazzi wrote:
>
> 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/76b0be45-6afe-499d-8357-19043f346847%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.