e=Eq(Dy[i], y[i])
print(fcode(e.rhs, assign_to=e.lhs, contract=True))
is allowed
e=Eq(Dy[i], y[i+1])
print(fcode(e.rhs, assign_to=e.lhs, contract=True))
Is not
Surprisingly,
>>> e=Eq(Dy[i], y[i+1])
>>> print(fcode(e.rhs, assign_to=e.lhs, contract=False))
Dy(i) = y(i + 1)
So, it seems to me that when it checks for the bounds with contract=True,
it does not know how to interpret calculations performed on the index
label, in this case y goes up to 5, so there is no out of bounds or
anything along those lines.
Do you think this conclusion is correct?
What information would you suggest to provide for a report on github?
Op woensdag 17 januari 2018 21:27:30 UTC+1 schreef Björn Dahlgren:
>
> Sorry I don't quite follow. That example shows finite differences, hence
> ``i`` and ``i + 1``.
--
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/9f4103ae-9df4-4500-b635-971c001e9f30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.