8000 BUG: Fix np.insert for inserting a single item into a structured array by seberg · Pull Request #5022 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG: Fix np.insert for inserting a single item into a structured array #5022

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

Merged
merged 1 commit into from
Aug 31, 2014

Conversation

seberg
Copy link
Member
@seberg seberg commented Aug 30, 2014

Note that there are some object array special cases because of allowing
multiple inserts. np.array(..., dtype=object) is not always clear.

Will probably add the append fix too (but it is a bit tricky)

@seberg
Copy link
Member Author
seberg commented Aug 30, 2014

The problem is, that insert actually does concatenate which figures the result dtype from the array and the array being appended (which is somewhat nonsense, but I doubt we can just change it)

@@ -1 +1 @@
Subproject commit 84cc897d266e0afc28fc5296edf01afb08005472
Subproject commit 447dd0b59c2fe91ca9643701036d3d04919ddc7e
Copy link
Contributor

Choose a reason for hiding this comment

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

commit -a is bad

Copy link
Member Author

Choose a reason for hiding this comment

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

oops

@seberg seberg force-pushed the structured-insert branch 3 times, most recently from 0ec1efa to a2cc78c Compare August 30, 2014 12:43
@charris
Copy link
Member
charris commented Aug 30, 2014

@seberg Are you going to add more?

@seberg
Copy link
Member Author
seberg commented Aug 30, 2014

Nah, its ok, append is a different issue, and I am not quite sure how/if we can tackle it easily.

@juliantaylor
Copy link
Contributor

would still need rebasing if its appropriate for 1.9

Note that there are some object array special cases because of allowing
multiple inserts. `np.array(..., dtype=object)` is not always clear.
@seberg seberg force-pushed the structured-insert branch fr 8000 om a2cc78c to f880b1a Compare August 30, 2014 16:57
@charris
Copy link
Member
charris commented Aug 30, 2014

@seberg In case you have forgotten the backport rebase, it is

git rebase --onto $(git merge-base master maintenance/1.9.x) HEAD^

@seberg
Copy link
Member Author
seberg commented Aug 30, 2014

Oh, we were at euroscipy, I already did it (with a little help from julian).

charris added a commit that referenced this pull request Aug 31, 2014
BUG: Fix np.insert for inserting a single item into a structured array
@charris charris merged commit 9c50f98 into numpy:master Aug 31, 2014
@charris
Copy link
Member
charris commented Aug 31, 2014

Well then, in it goes. Thanks.

juliantaylor added a commit that referenced this pull request Sep 2, 2014
BUG: Fix np.insert for inserting a single item into a structured array
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
0