You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2021/04/21 14:13:00 UTC
[jira] [Assigned] (ARROW-12495) [C++][Python] NumPy buffer sets
is_mutable_ to true but does not set mutable_data_ when the NumPy array is
writable
[ https://issues.apache.org/jira/browse/ARROW-12495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antoine Pitrou reassigned ARROW-12495:
--------------------------------------
Assignee: Antoine Pitrou
> [C++][Python] NumPy buffer sets is_mutable_ to true but does not set mutable_data_ when the NumPy array is writable
> -------------------------------------------------------------------------------------------------------------------
>
> Key: ARROW-12495
> URL: https://issues.apache.org/jira/browse/ARROW-12495
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Python
> Reporter: Wes McKinney
> Assignee: Antoine Pitrou
> Priority: Major
> Fix For: 4.0.0
>
>
> Bug is evident
> {code}
> NumPyBuffer::NumPyBuffer(PyObject* ao) : Buffer(nullptr, 0) {
> PyAcquireGIL lock;
> arr_ = ao;
> Py_INCREF(ao);
> if (PyArray_Check(ao)) {
> PyArrayObject* ndarray = reinterpret_cast<PyArrayObject*>(ao);
> data_ = reinterpret_cast<const uint8_t*>(PyArray_DATA(ndarray));
> size_ = PyArray_SIZE(ndarray) * PyArray_DESCR(ndarray)->elsize;
> capacity_ = size_;
> if (PyArray_FLAGS(ndarray) & NPY_ARRAY_WRITEABLE) {
> is_mutable_ = true;
> }
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)