-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Assiging to structured array rows with list/array fails (Trac #1758) #2353
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
Labels
Comments
@rgommers wrote on 2011-03-09 For the array assignment part, it does work when no casting has to be done. From Skipper on-list:
Still a bug, since casting elements of a tuple works fine. |
Still fails 1.9-devel. |
ahaldane
added a commit
to ahaldane/numpy
that referenced
this issue
Jun 17, 2016
This commit attempts to make structure assignment more consistent, and then changes multi-field indices to return a view instead of a copy. Assignment between structures now works "by field position" rather than "by field name". Fixes numpy#2353, fixes numpy#6085, fixes numpy#3351, fixes numpy#6085, fixes numpy#6314, fixes numpy#2346, fixes numpy#7058, fixes numpy#3641, fixes numpy#5994, fixes numpy#7262, fixes numpy#7493
ahaldane
added a commit
to ahaldane/numpy
that referenced
this issue
Sep 7, 2017
This commit attempts to make structure assignment more consistent, and then changes multi-field indices to return a view instead of a copy. Assignment between structures now works "by field position" rather than "by field name". Fixes numpy#2353, fixes numpy#6085, fixes numpy#3351, fixes numpy#6085, fixes numpy#6314, fixes numpy#2346, fixes numpy#7058, fixes numpy#3641, fixes numpy#5994, fixes numpy#7262, fixes numpy#7493
theodoregoetz
pushed a commit
to theodoregoetz/numpy
that referenced
this issue
Oct 23, 2017
This commit attempts to make structure assignment more consistent, and then changes multi-field indices to return a view instead of a copy. Assignment between structures now works "by field position" rather than "by field name". Fixes numpy#2353, fixes numpy#6085, fixes numpy#3351, fixes numpy#6085, fixes numpy#6314, fixes numpy#2346, fixes numpy#7058, fixes numpy#3641, fixes numpy#5994, fixes numpy#7262, fixes numpy#7493
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original ticket http://projects.scipy.org/numpy/ticket/1758 on 2011-03-07 by @rgommers, assigned to unknown.
Assigning to a structured array with a tuple works, with a list results in an error. Would be good if this could be made to work (this is an enhancement request). With an array gives no warning or exception, but results in garbage. This is a bug.
See also http://thread.gmane.org/gmane.comp.python.numeric.general/30793/focus=30793
If this is fixed, please update doc/structured_arrays.py (section "Filling structured arrays").
The text was updated successfully, but these errors were encountered: