Array: non-dask-arrays and broadcasting in ravel_multi_index#7594
Array: non-dask-arrays and broadcasting in ravel_multi_index#7594jrbourbeau merged 9 commits intodask:mainfrom
ravel_multi_index#7594Conversation
Works for all cases besides when some input arrays require broadcasting. Also the logic when multi_index is arraylike isn't working.
This reverts commit e1df54e. Hopefully we can rewrite `broadcast`-style functions, plus `stack`, to use Blockwise/HLGs and get some optimizations for them, so eventually the non-blockwise implementation will be just as performant.
Co-authored-by: Illviljan <14371165+Illviljan@users.noreply.github.com>
f4d532a to
71a484f
Compare
jrbourbeau
left a comment
There was a problem hiding this comment.
Thanks @gjoseph92! One small comment, otherwise this looks great
|
@jrbourbeau good point, I've now left it to downstream methods be restrictive about unknown chunksizes. All green except for one DataFrame |
jrbourbeau
left a comment
There was a problem hiding this comment.
Yep, agreed that looks unrelated. Just restarted CI to see if the failure is transient
…multi_index_non_array_args
|
I've restarted CI a few times and |
|
Yup, I'll dig into it more. This is very strange. |
…multi_index_non_array_args
jrbourbeau
left a comment
There was a problem hiding this comment.
Just merged main into this PR and test_pivot_table is now passing ✨. I'm going to merge this and keep an eye out for any test_pivot_table failures. Thanks @gjoseph92!
ravel_multi_indexassumed the input was always a dask array (#7580). This fixes that, but also resolves other things that diverged from the NumPy implementation. Now:With a little bit more thinking, I'm sure we could get this to use
blockwisefor better graph performance—it just wasn't working on the multidimensional/broadcasting case. But hopefully, we can rewritebroadcast_arraysandstacksoon to use blockwise, so we can use these higher-level operations and get the benefits.@Illviljan sorry, I found this issue independently and didn't see #7584 until I had already written all this... how does this seem to you?
cc @jrbourbeau @dougiesquire
Note: requires #7593 for tests to pass.
black dask/flake8 dask/isort dask