-
Notifications
You must be signed in to change notification settings - Fork 858
Fix squeeze bug for length 1 array, and inconsistency on requirements and setup.py #1540
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
Conversation
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.
nice! why are the munkres
changes related?
include_package_data=True, | ||
install_requires=[ | ||
"munkres==1.1.2", | ||
"munkres>=1.0.6", |
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.
are these version commits related to this patch?
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.
They're not, but tox -e check
was failing without it.
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.
I'll try reverting it and see if travis ci passes.
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.
CI fails if I revert.
Y = to_int_label_array(np.array([[1]]), flatten_vector=True) | ||
Y_expected = np.array([1]) | ||
np.testing.assert_array_equal(Y, Y_expected) | ||
|
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.
nice!
06964e2
to
3424671
Compare
Codecov Report
@@ Coverage Diff @@
## master #1540 +/- ##
==========================================
+ Coverage 97.11% 97.11% +<.01%
==========================================
Files 55 55
Lines 2077 2079 +2
Branches 341 342 +1
==========================================
+ Hits 2017 2019 +2
Misses 31 31
Partials 29 29
|
3424671
to
eb1a2e9
Compare
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.
nice catch!! lgtm 🚢
#Description of proposed changes
Squeezing a length 1 array for used to create a scalar instead of a 1D array as intended. Fixed by adding an extra check.
Also made munkres version in setup.py consistent with requirements.
Test plan
Update unit test for changed function.
Checklist
Need help on these? Just ask!
tox -e complex
and/ortox -e spark
if appropriate.