8000 setting entry in struct array with object field · Issue #6806 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

setting entry in struct array with object field #6806

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

Closed
anntzer opened this issue Dec 11, 2015 · 2 comments
Closed

setting entry in struct array with object field #6806

anntzer opened this issue Dec 11, 2015 · 2 comments

Comments

@anntzer
Copy link
Contributor
anntzer commented Dec 11, 2015
In [23]: a = np.ones(3, 'i4, O')

In [24]: a[0] = a[1]
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-24-5ef5a6077ce6> in <module>()
----> 1 a[0] = a[1]

ValueError: Setting void-array with object members using buffer.

numpy 1.10.1
First reported by @ldoddema in #6776.

@ahaldane
Copy link
Member

This is an old bug present in 1.9.3 (or before). It happens because of the behavior of structured item assignemt (in VOID_setitem), which treats the lhs as a buffer. This causes a number of known bugs.

A possible fix to this is implemented in #6053. (See links there for related bugs)

@charris
Copy link
Member
charris 73CE commented Dec 11, 2015

Closing as duplicate.

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

No branches or pull requests

3 participants
0