Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There should be no need to rechunk
cdist
's result to match the input arrays. After all this chunking should just fall out from the operations that we have done incdist
. The only way the chunks would not match is if there was some rechunking done behind the scenes. If rechunking was done behind the scenes, there probably was a reason for it and thus we should leave the result's chunks alone.This rechunking was likely added to guarantee that
pdist
'striu
-based optimization strategy would work (astriu
requires square chunks). However we have dropped thetriu
-based optimization frompdist
in favor of slicing out the relevant pieces to keep ourselves. So there is no requirement frompdist
to havecdist
rechunk the result. Further if we did readd sometriu
-based optimization topdist
, it would be up topdist
to guarantee the chunking was appropriate. Sopdist
's former requirement should not constraincdist
's result's chunks.