Skip to content
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

Fixed bug in sorting on array interface #1399

Merged
merged 2 commits into from May 3, 2017

Conversation

Projects
None yet
2 participants
@philippjfr
Copy link
Contributor

philippjfr commented May 3, 2017

It appears that sorting on the ArrayInterface was broken in certain cases, this creates a recarray view to perform the sorting on, which should work more robustly. I'll add a couple of tests before this is ready to merge.

@philippjfr

This comment has been minimized.

Copy link
Contributor Author

philippjfr commented May 3, 2017

Ready to review. Note that the grid interfaces don't support sorting in general and neither does dask, hence the "Not supported" unit tests.

@philippjfr philippjfr requested a review from jlstevens May 3, 2017

@jlstevens

This comment has been minimized.

Copy link
Contributor

jlstevens commented May 3, 2017

Using a record array like that seems a bit like a big hammer but I can see why it might be more reliable. Anyway, looks good and the tests are passing. Merging.

@jlstevens jlstevens merged commit feb2a5c into master May 3, 2017

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 79.201%
Details
s3-reference-data-cache Test data is cached.
Details
@philippjfr

This comment has been minimized.

Copy link
Contributor Author

philippjfr commented May 3, 2017

Using a record array like that seems a bit like a big hammer but I can see why it might be more reliable.

Since it's just a view it should be fairly lightweight, and looking back at it I think it was using a record array without explicit naming before anyway. Seems to be the only way to sort by column.

@jlstevens

This comment has been minimized.

Copy link
Contributor

jlstevens commented May 3, 2017

For lexical sort? Right, I've used record arrays for that before...

@philippjfr

This comment has been minimized.

Copy link
Contributor Author

philippjfr commented May 3, 2017

For lexical sort? Right, I've used record arrays for that before...

Right.

@jbednar jbednar deleted the array_interface_sort_fix branch May 3, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.