-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Conversation
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commit -a is bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops
0ec1efa
to
a2cc78c
Compare
@seberg Are you going to add more? |
Nah, its ok, append is a different issue, and I am not quite sure how/if we can tackle it easily. |
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.
a2cc78c
to
f880b1a
Compare
@seberg In case you have forgotten the backport rebase, it is
|
Oh, we were at euroscipy, I already did it (with a little help from julian). |
BUG: Fix np.insert for inserting a single item into a structured array
Well then, in it goes. Thanks. |
BUG: Fix np.insert for inserting a single item into a structured array
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)