Updates:
Status: Fixed
Labels: -NeedsReview -smichr
Comment #46 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
1374's comment 19 suggested that the solution to 1374's problem would be to
do an rsimplify; there
Issue 1778: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
This issue is no longer blocking issue 1914.
See http://code.google.com/p/sympy/issues/detail?id=1914
--
You received this message because you are listed in the owner
or CC fields of this issue,
Comment #45 on issue 1778 by asmeurer: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
That pull request was closed. Is this issue fixed, and if so, are the
blocked on issues fixed?
--
You received this message because you are subscribed to the Goog
Comment #44 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I put in a pull request on this and it's being reviewed. I would appreciate
it if Ronan could take a look since he did the reorganization of core which
this work tou
Comment #43 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
Regarding (1) above: being able to do the whole expression at once doesn't
come until commit 1975, but the functionality to convert the reals to
rationals is present
Comment #42 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I believe this is ready for final review. It already had +1 from Ondrej and
Vinzent and I think I've addressed Ronan's concerns.
It and 1914 are included in branch 1
Updates:
Labels: smichr
Comment #41 on issue 1778 by asmeurer: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
(No comment was entered for this change.)
--
You received this message because you are subscribed to the Google Groups
"sympy-issues"
Comment #40 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
Another issue that this branch addresses is the sympification of longs:
S('222/111')
2L
With the changes of this branch, the result is the Integer 2.
Comment #39 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
OK, it's split out and I am putting a note in issue 1914. Also, I don't
test that all the options are being passed along when iterating over the
iterable...can the "
Comment #38 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
It used to be 1914; but since it is all sympify related I put it together.
I changed the processing of other iterables to make them use the provided
flags...I'll put
Comment #37 on issue 1778 by Vinzent.Steinberg: Rational from string can be
improved
http://code.google.com/p/sympy/issues/detail?id=1778
Looks good, but there is no test for sympifying of dictionaries. Also, this
change seems unrelated to the fractions stuff, so maybe it should be in a
d
Updates:
Cc: ondrej.certik
Comment #36 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
This branch has been rebased over the latest master and has been merged
with 1914. Please see smichr branch 1778 at github.
--
You
Comment #35 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
see commit 1778b for changes
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adj
Issue 1778: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
This issue is now blocking issue 1914.
See http://code.google.com/p/sympy/issues/detail?id=1914
--
You received this message because you are listed in the owner
or CC fields of this issue, or be
Updates:
Labels: -NeedsBetterPatch NeedsReview
Comment #34 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I've implemented the rational=False flag on nsimplify and renamed rsimplify
to
_real_to_rational and added a do
Comment #33 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
comment 31a: done
comment 31b, 32a: what about this:
nsimplify(expr, rational=True) => calls rsimplify to be named
_real_to_rational
sympify(expr, rational=True) => do
Comment #32 on issue 1778 by ronan.l...@gmail.com: Rational from string can
be improved
http://code.google.com/p/sympy/issues/detail?id=1778
* I don't like the name of rsimplify: what it does appears unrelated to
simplification and there's a possible confusion with ratsimp.
* I think Rationa
Issue 1778: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
This issue is now blocking issue 1374.
See http://code.google.com/p/sympy/issues/detail?id=1374
--
You received this message because you are listed in the owner
or CC fields of this issue, or be
Updates:
Labels: -NeedsReview NeedsBetterPatch
Comment #31 on issue 1778 by Vinzent.Steinberg: Rational from string can be
improved
http://code.google.com/p/sympy/issues/detail?id=1778
Thanks, looks good, all the tests pass...
-if isinstance(obj,tuple) and len(obj)==2:
+
Comment #30 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
not 2nd to last...the one just before '1766 et al'
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred t
Updates:
Labels: -NeedsBetterPatch NeedsReview
Comment #29 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
Please see commit 1778 (the 2nd to the last) in my 1766 branch at github.
The big change to Rational is that all
Comment #28 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
Having not heard anything, I went ahead and did the following:
rework rsimplify et al: rsimplify is used to change a basic expression
into an expression where the numbe
Comment #27 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
OK. In my original post I was going to suggest "literal" but "exact" can
work, too. I
checked to see that nsimplify would recognize that .[23] is 23/99 and saw
the "
Comment #26 on issue 1778 by fredrik.johansson: Rational from string can be
improved
http://code.google.com/p/sympy/issues/detail?id=1778
That is not actually what the 'full' option in nsimplify does. The option
here should
probably be called 'exact' or something like that. Converting a flo
Updates:
Cc: Ronan.Lamy
Comment #25 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I suppose we could make Rational quite limited and strict, instantiating
from 1 or 2
integers/longs/Integers/Rationals: Rational(i, j=1
Updates:
Labels: -NeedsReview NeedsBetterPatch
Comment #24 on issue 1778 by asmeurer: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I agree with Ronan on #3. Make a rational() function or a to_rational()
method that recursively converts into
Comment #23 on issue 1778 by ronan.l...@gmail.com: Rational from string can
be improved
http://code.google.com/p/sympy/issues/detail?id=1778
1) OK
2) I quoted your commit message. The problem is that there are a number of
expressions which should all return the same thing to avoid confusing
Comment #22 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
Regarding comment 21's comments:
1) as per comments 5 and 6, I moved the existing string parsing to sympify.
It's a
step in the right direction. If someone has the AS
Updates:
Labels: -PassedReview NeedsReview
Comment #21 on issue 1778 by ronan.l...@gmail.com: Rational from string can
be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I have several reservations:
* I believe that string handling should be done in ast_parser, not in
Comment #20 on issue 1778 by mattpap: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I'm not sure about new polys, as it is not yet it. Will it also recognize
1/7?
The current behavior in polys is as follows:
In [1]: f = 3*x**2/5 + 2*x/7 + 1/7
In
Issue 1778: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
This issue is now blocking issue 1820.
See http://code.google.com/p/sympy/issues/detail?id=1820
--
You received this message because you are listed in the owner
or CC fields of this issue, or be
Updates:
Labels: -NeedsReview PassedReview
Comment #19 on issue 1778 by ondrej.certik: Rational from string can be
improved
http://code.google.com/p/sympy/issues/detail?id=1778
Looking at this patch, it's +1 from me, by looking at it. If all tests
pass, let's
push it in.
--
You re
Comment #18 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
Ahh...the changes got squashed in with ': more conservative together'. I
extracted them from there and squashed everything together into commit
1778. I ran
'test
Comment #17 on issue 1778 by Vinzent.Steinberg: Rational from string can be
improved
http://code.google.com/p/sympy/issues/detail?id=1778
Cherry-picking your commit I get this:
__ sympy/core/tests/test_numbers.py:test_Rational_new
__
File "/home/one/src/sympy/sym
Comment #16 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
OK, there is a new commit in 1766 numbered 1778 that attempts (and tests) a
fix for
this that can be reviewed.
--
You received this message because you are listed in
Comment #15 on issue 1778 by Vinzent.Steinberg: Rational from string can be
improved
http://code.google.com/p/sympy/issues/detail?id=1778
That's because nsimplify() does not find a simplified version in this case.
Maybe we
should fall back to the old method in such cases (e.g. returning
2
Comment #14 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
There is a problem in that when the real gets to be too long, it isn't
converted.
e.g. something like 2.2345678*x is unchanged.
Perhaps with the new Polys and its ab
Updates:
Labels: -NeedsBetterPatch NeedsReview
Comment #13 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
see mods at 1766 again.
--
You received this message because you are listed in the owner
or CC fields of this issu
Comment #12 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
The ambiguity is in what the intent of the user is: do they want .3 or do
they want
the actual representation, 2/10. Without
the quote
Comment #11 on issue 1778 by asmeurer: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I do not see the ambiguity. When you call Rational, the arguments are
expected to be converted into a SymPy
Rational class, if that is possible. The rational versio
Comment #10 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
When someone writes R('.3*x') there is no ambiguity about the .3; when one
write
R(.3) there is ambiguity about which neither Rational nor Decimal wish to
guess. So
t
Updates:
Labels: -NeedsReview NeedsBetterPatch
Comment #9 on issue 1778 by asmeurer: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I guess the only question is, do we want Rational to behave this way:
In [2]: print Rational(.3*x)
3*x/10
instea
Comment #8 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
Please see commit 1778 in branch 1766 at smichr's github account. It has
been fixed.
Is there a concern about Comment 5 that remains? I'm not sure I understood
the iss
Comment #7 on issue 1778 by Vinzent.Steinberg: Rational from string can be
improved
http://code.google.com/p/sympy/issues/detail?id=1778
This should be indeed fixed.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
Comment #6 on issue 1778 by asmeurer: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
Well, it needs to do type checking. I guess the real question is, why does
anything other than sympify try to
convert strings into sympy expressions? And if it does,
Comment #5 on issue 1778 by Vinzent.Steinberg: Rational from string can be
improved
http://code.google.com/p/sympy/issues/detail?id=1778
> In fact, is there a good reason why we don't just put this all in sympify
> and have
Rational call sympify?
Performance and continuity. Imagine you call
Comment #4 on issue 1778 by asmeurer: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
We should fix sympify to do that too:
In [2]: sympify('0.[3]')
TypeError: 'Zero' object is unsubscriptable
In fact, is there a good reason why we don't just put this a
Comment #3 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
Yes...please check now.
Regarding '.[3]', that's an existing instantiation for Rational meaning
0.333 The
problem is that you used to have to put a 0 in from of it
Comment #2 on issue 1778 by asmeurer: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
I don't see that commit, but maybe I am looking too soon. Nonetheless, I
think the supported method of
converting a string to a SymPy expression is through the sympif
Updates:
Cc: asmeurer Vinzent.Steinberg
Labels: NeedsReview
Comment #1 on issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
This can be reviewed as commit 1778 in smichr's 1766 branch at github.
--
You received this me
Status: Accepted
Owner: smichr
Labels: Type-Defect Priority-Medium
New issue 1778 by smichr: Rational from string can be improved
http://code.google.com/p/sympy/issues/detail?id=1778
There are some difficulties with instantiating Rationals from strings due
to insufficient massaging of the input s
51 matches
Mail list logo