[NumPy-Tickets] [NumPy] #1233: Deserialized arrays with base mutate strings
NumPy Trac
numpy-tickets@scipy....
Thu Mar 24 18:35:42 CDT 2011
#1233: Deserialized arrays with base mutate strings
------------------------+---------------------------------------------------
Reporter: hniksic | Owner: somebody
Type: defect | Status: new
Priority: highest | Milestone: 1.6.0
Component: numpy.core | Version: devel
Keywords: |
------------------------+---------------------------------------------------
Changes (by mwiebe):
* priority: normal => highest
* version: => devel
* milestone: => 1.6.0
Comment:
The first case no longer creates a view into a string in 1.6 beta, but the
second case still does. The unpickled array should always own its data.
The behavior of Python's internal 'A' string being changed is still there:
{{{
In [64]: a = numpy.array([65], 'int8')
In [65]: b = a[::-1]
In [66]: c = p.loads(p.dumps(b, -1))
In [67]: c
Out[67]: array([65], dtype=int8)
In [68]: c.base
Out[68]: 'A'
In [69]: c[0] = 66
In [70]: c.base
Out[70]: 'B'
In [71]: type(c.base)
Out[71]: str
In [72]: 'A'
Out[72]: 'B'
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1233#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list