Skip to content

Use asarray in extract#4549

Merged
mrocklin merged 1 commit intodask:masterfrom
jakirkham:use_da_asarray_extract
Mar 6, 2019
Merged

Use asarray in extract#4549
mrocklin merged 1 commit intodask:masterfrom
jakirkham:use_da_asarray_extract

Conversation

@jakirkham
Copy link
Copy Markdown
Member

Force both array inputs to Dask Arrays. This avoids potentially converting a different array type to a NumPy array by accident.

  • Tests added / passed
  • Passes flake8 dask

Force both array inputs to Dask Arrays. This avoids potentially
converting a different array type to a NumPy array by accident.
@jakirkham jakirkham force-pushed the use_da_asarray_extract branch from 6cabfbd to 27f8926 Compare March 6, 2019 00:49
@mrocklin
Copy link
Copy Markdown
Member

mrocklin commented Mar 6, 2019

This looks fine to me. I wonder how we should end up testing changes like this.

Something with sparse perhaps?

(not a requirement for this PR necessarily, just wondering what the right approach is long term)

@mrocklin
Copy link
Copy Markdown
Member

mrocklin commented Mar 6, 2019

Also cc @pentschev , just so that he's aware

@jakirkham
Copy link
Copy Markdown
Member Author

It's a fair question. Though it's probably one that we want to ask over the test suite as a whole as opposed to each test case. Pytest's fixtures come to mind, but IDK if that is the right solution. Should we move this to an issue to discuss further?

@mrocklin
Copy link
Copy Markdown
Member

mrocklin commented Mar 6, 2019 via email

@pentschev
Copy link
Copy Markdown
Member

I think it would be good indeed to have more tests with Sparse too, in particular for these issues related to NEP-18. I'll try to add some more within the context of #4486.

@mrocklin mrocklin merged commit bb6b5a9 into dask:master Mar 6, 2019
@jakirkham jakirkham deleted the use_da_asarray_extract branch March 6, 2019 15:36
jorge-pessoa pushed a commit to jorge-pessoa/dask that referenced this pull request May 14, 2019
Force both array inputs to Dask Arrays. This avoids potentially
converting a different array type to a NumPy array by accident.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants