This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients pitrou
Date 2008-12-07.20:31:45
SpamBayes Score 8.9680503e-07
Marked as misclassified No
Message-id <1228681907.24.0.868516520055.issue4580@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is with the `shape` member which doesn't get recalculated as
it should when instantiating a memoryview slice:

>>> a = array('i', range(10))
>>> m = memoryview(a)[2:8]
>>> a
array('i', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> m[:] = array('i', range(6))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: cannot modify size of memoryview object
>>> len(m)
6
>>> m.shape
(10,)

An additional problem is that `shape` is a pointer to an array of
integers, and we don't know how to reallocate it.
History
Date User Action Args
2008-12-07 20:31:47pitrousetrecipients: + pitrou
2008-12-07 20:31:47pitrousetmessageid: <1228681907.24.0.868516520055.issue4580@psf.upfronthosting.co.za>
2008-12-07 20:31:46pitroulinkissue4580 messages
2008-12-07 20:31:45pitroucreate