-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We can tolerate PyPy now... #1139
Conversation
@@ -29,7 +29,7 @@ def eval_N( | |||
expression: BaseElement, | |||
evaluation: Evaluation, | |||
prec: BaseElement = SymbolMachinePrecision, | |||
) -> BaseElement: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This type mismatch and the one above were noticed when looking at another bug we have.
There is pollution to values of some non-Python data. (Probably some structure is modifying a list in place).
A fix for the underlying problem will occur down the line.
@@ -134,7 +134,7 @@ def quiet_f(*args): | |||
|
|||
|
|||
def eval_ListPlot( | |||
plot_groups: list, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it not be better to ensure using one type or the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm...
plot_groups is sometimes the result of expr.to_python()
. For a ListExpression
this is a list.
In the case of constant data we have a tuple; here, this is synonymous with an immutable list.
I think plot_groups should be a tuple - immutable. However, I don't think we can change the return type of to_python()
and I don't think we can change it to tuple on return without first detecting that it is a list. Otherwise, we would be wrapping a scalar into a tuple.
So, while I agree it would be better to ensure a tuple is passed in, at this stage, I am not sure I want take the risk of converting a list to tuple right now.
I have made note of this issue though in commit 016f6be
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think it would be enough by now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #661