-
Notifications
You must be signed in to change notification settings - Fork 526
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
Add handling for NumericConstant to _get_linear_collector in canonical_repn #169
Conversation
@qtothec: the fix from #168 is of course fine. For the As a matter of principle, can you add tests that exercises this? I am a bit bothered by the fact that this slipped through all unit tests... In particular,
|
@jsiirola: I did add an entry to the _linear_collectors map as well, I thought: ebcc17a#diff-ac36e141575714662fcdaf34e53e2b1bR757 As for the testing, I'm not completely sure how to manufacture these examples. I only found this because my own code broke. |
Codecov Report
@@ Coverage Diff @@
## master #169 +/- ##
==========================================
+ Coverage 66.17% 66.18% +0.01%
==========================================
Files 442 442
Lines 56759 56761 +2
==========================================
+ Hits 37561 37568 +7
+ Misses 19198 19193 -5
Continue to review full report at Codecov.
|
NOTE: This change will be superceded by changes in the expr_dev branch, where the canonical representation has been removed. |
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.
If the changes in #272 fix this, then that's perfectly fine with me. Is
#272 stable enough for me to start using it?
On Wed, Jan 3, 2018, 13:10 Bethany Nicholson ***@***.***> wrote:
***@***.**** commented on this pull request.
I agree with @jsiirola <https://github.com/jsiirola> about the need for
more tests here. However, given @whart222 <https://github.com/whart222>'s
comment, maybe it is best to close this and revisit it after merging #272
<#272>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#169 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AFowrDG03BAz6cvZgGjYxCGbOK-XcAPWks5tG9BkgaJpZM4N7VYH>
.
--
Qi Chen
PhD Candidate
Center for Advanced Process Decision-Making
[email protected]
|
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.
Approved.
In the process of trying to work around #167 by wrapping the substituted value in a
NumericConstant
, I came across #168 and also now the fact that_get_linear_collector()
does not supportNumericConstant
. This fix adds in that support (in addition to the bugfix in #168) by piggybacking off of handling for parameters.This is motivated by my desire not to declare a bunch of new parameters just to do some substitution of constant values that I do not intend to save and use again.