Skip to content

MAINT: cancel multifield copy->view and copy-by-position plans (alternate proposal)#11530

Closed
ahaldane wants to merge 1 commit intonumpy:masterfrom
ahaldane:cancel_multifield_changes
Closed

MAINT: cancel multifield copy->view and copy-by-position plans (alternate proposal)#11530
ahaldane wants to merge 1 commit intonumpy:masterfrom
ahaldane:cancel_multifield_changes

Conversation

@ahaldane
Copy link
Member

@ahaldane ahaldane commented Jul 8, 2018

This is a branch where I essentially reverted the major changes of #6053, since it causes some back-compat problems. Putting it here so we can compare, before deciding which way to go. See discussion in #11526. This revers the "multifield indexing returns a view" change, and the "multifield assignment occurs by-position instead of by-name" change.

#6053 wouldn't all be a loss though. This PR still keeps all the little fixes from that PR, and I also make multifield assignment consistent: Before #6053 you would get different behavior depending on whether you did array vs scalar assignment. In #6053 I chose to make all of numpy use "copy-by-position" for multifield assignment, in this PR everything is "copy-by-name". That means there is still a back-compat break in this PR for structured scalar assignment, but probably it has much less effect than #6053.

So if we go this route, at least numpy will be more self-consistent, while still being fairly back-compatible.

Also, at least in #6053 I have worked out how I think multifield indexing behavior should work, without all the quirks of current numpy. The day we implement the new standalone structured dtypes I suggest we use the behavior I worked out in #6053, if we decide to remove it here.

A lot of the code change here is just pasting back in things I removed in #6053.

@charris
Copy link
Member

charris commented Jul 8, 2018

Unused variable warning is causing problems.

@charris
Copy link
Member

charris commented Dec 1, 2018

@ahaldane Is this still relevant?

@ahaldane
Copy link
Member Author

ahaldane commented Dec 1, 2018

This is set to be auto-closed if #12447 is merged (see github note about this a few lines up).

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.

4 participants