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

REV: "ENH: Improved performance of PyArray_FromAny for sequences of array-like" #14109

Merged

Conversation

seberg
Copy link
Member

@seberg seberg commented Jul 24, 2019

This reverts commit 71fc59d
which was part of gh-13399 and the followup commit
ba53a63 from gh-13663.

The issue is that we mix Sequence protocol and __array__ usage
when coercing arrays. It seems easiest to revert this for the 1.17.x release
and make a larger breaking change in the 1.18.x release cycle.
Since this only occurs for stranger array-likes. This revert is limited
to the 1.17.x branch for now.


@charris do you think such a revert is feasible? I have removed the benchmark and test changes from the revert. The PR was a bit of nice maintenance as well, but it seems to me that full revert is "simpler".

@seberg
Copy link
Member Author

seberg commented Jul 24, 2019

I cannot say I am super happy with reverting, but it does seem like the easiest solution if we want to release quickly unfortunately.

…rray-like"

This reverts commit 71fc59d
which was part of numpygh-13399 and the followup commit
ba53a63 from numpygh-13663.

The issue is that we mix Sequence protocol and `__array__` usage
when coercing arrays. It seems easiest to revert this for the 1.17.x release
and make a larger breaking change in the 1.18.x release cycle.
Since this only occurs for stranger array-likes. This revert is limited
to the 1.17.x branch for now.
@seberg seberg force-pushed the revert-arraylike-coerce-speedup branch from 875a8c4 to 4045da3 Compare July 24, 2019 23:40
"data": bytes(42)
}

# Make sure __array_*__ is used instead of Sequence methods.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm. Removed the test for now, because __iter__ is now used again (tripping this assertion).

@charris charris added 06 - Regression 09 - Backport-Candidate PRs tagged should be backported labels Jul 25, 2019
@charris charris added this to the 1.17.0 release milestone Jul 25, 2019
@charris
Copy link
Member

charris commented Jul 25, 2019

A simple reversion would be easiest for 1.17.

@seberg
Copy link
Member Author

seberg commented Jul 25, 2019

@charris you mean make this against master instead? I guess that is better, otherwise keeping track of it gets harder.

@charris
Copy link
Member

charris commented Jul 25, 2019

Probably fine to keep this against 1.17 as long as an issue for 1.18 is opened.

@charris charris merged commit dd1ea67 into numpy:maintenance/1.17.x Jul 25, 2019
@charris
Copy link
Member

charris commented Jul 25, 2019

OK, let's do this. We can revisit at leisure. Thanks Sebastian.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants