Re: [sympy] Re: fcode example in documentation not working?

2019-08-24 Thread Oscar Benjamin
On Sat, 24 Aug 2019 at 01:29, manaxf  wrote:
>
> Has this issue been fixed?

I don't know but judging from Bjorn's comments maybe it isn't that
hard to fix. Are you interested in sending a PR?

-- 
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 sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAHVvXxREkr7yO%3DUmQuXw5c1OuqjgbmDCj4gL2eAYSo%3Dgk1nmDQ%40mail.gmail.com.


[sympy] Re: fcode example in documentation not working?

2019-08-23 Thread manaxf
Has this issue been fixed? It is also broken in other printers, making 
these feature virtually useless for generating finite difference (and other 
discrete) formulas without some serious overriding of the printers.

On Wednesday, January 17, 2018 at 3:34:05 PM UTC-8, Björn Dahlgren wrote:
>
> Oh, yes. I agree, it looks as if the arithmetic is tripping up the routine 
> which determines the bounds.
>
> For the contents in the issue: just a (minimal) self-contained failing 
> example (like your last example),
> together with what you had expected to be the output (and a few words 
> describing the rationale).
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/9c21ee73-dda5-4fd0-a9b9-39d470898b62%40googlegroups.com.


[sympy] Re: fcode example in documentation not working?

2018-01-17 Thread Björn Dahlgren
Oh, yes. I agree, it looks as if the arithmetic is tripping up the routine 
which determines the bounds.

For the contents in the issue: just a (minimal) self-contained failing example 
(like your last example),
together with what you had expected to be the output (and a few words 
describing the rationale).

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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/dc5c4ce5-61bf-4b02-b904-e59a7ad01100%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: fcode example in documentation not working?

2018-01-17 Thread The Pauli Principle

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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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.


[sympy] Re: fcode example in documentation not working?

2018-01-17 Thread 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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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/590092e5-531d-47c4-9982-eea93776761c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: fcode example in documentation not working?

2018-01-16 Thread The Pauli Principle
Actually, the problem seems to be the usage of mathematics with the 
indices. If you use an example where the indices are used as is, it works 
for me.

Op dinsdag 16 januari 2018 16:41:39 UTC+1 schreef Björn Dahlgren:
>
>
> On Tuesday, 16 January 2018 15:07:31 UTC+1, The Pauli Principle wrote:
>>
>>
>> I added the last line in accordance with the comments, this should yield 
>> a version with for loops.
>>
>
> In this case it probably should (since there are bounds given on i). Can 
> you open an issue for it on github?
>
> Best,
> Björn
>

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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/696da841-10ac-484c-80dd-d0b390d89cb9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[sympy] Re: fcode example in documentation not working?

2018-01-16 Thread Björn Dahlgren

On Tuesday, 16 January 2018 15:07:31 UTC+1, The Pauli Principle wrote:
>
>
> I added the last line in accordance with the comments, this should yield a 
> version with for loops.
>

In this case it probably should (since there are bounds given on i). Can 
you open an issue for it on github?

Best,
Björn

-- 
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 sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
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/4fc3a0d2-b53d-4c65-a99f-985f6f6b0a84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.