TensorIndexType.epsilon always returns None

19 visualizações
Pular para a primeira mensagem não lida

r.du...@gmail.com

não lida,
26 de jul. de 2017, 12:49:0726/07/2017
para sy...@googlegroups.com
Dear developers of module tensor

I have the impression that the method TensorIndexType.epsilon always returns None (see EXAMPLE below)

I guess that this misbehavior is due to the initial check in method get_epsilon, which reads

def get_epsilon(self):
if not isinstance(self._eps_dim, int):
return None
...
see https://github.com/sympy/sympy/blob/master/sympy/tensor/tensor.py#L1725

My example suggests that int should be replaced by Integer...

ric

EXAMPLE obtained from Sympy live
>>> from sympy.tensor.tensor import *
>>> E3 = TensorIndexType('E3', dim=3, dummy_fmt='l')
>>> E3.epsilon == None
True

>>> E3.get_epsilon() == None
True

>>> isinstance(E3._eps_dim, int)
False

>>> isinstance(E3._eps_dim, Integer)
True

Francesco Bonazzi

não lida,
27 de jul. de 2017, 12:04:3427/07/2017
para sympy
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem