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 Ramchandra Apte, christian.heimes, georg.brandl, gvanrossum, josh.r, martin.panter, pitrou, rhettinger, serhiy.storchaka, terry.reedy, vstinner
Date 2016-01-08.00:19:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452212353.45.0.425242575285.issue19251@psf.upfronthosting.co.za>
In-reply-to
Content
Two years ago I suggested this:

> Then I would prefer a view, using e.g. the buffer API, but without any copies.

... and of course Numpy already provides such an API:

>>> a, b = b"123", bytearray(b"abc")
>>> p = np.frombuffer(a, dtype=np.int8)
>>> q = np.frombuffer(b, dtype=np.int8)
>>> p ^ q
array([80, 80, 80], dtype=int8)
>>> b[0] = 64
>>> p ^ q
array([113,  80,  80], dtype=int8)
History
Date User Action Args
2016-01-08 00:19:13pitrousetrecipients: + pitrou, gvanrossum, georg.brandl, rhettinger, terry.reedy, vstinner, christian.heimes, Ramchandra Apte, martin.panter, serhiy.storchaka, josh.r
2016-01-08 00:19:13pitrousetmessageid: <1452212353.45.0.425242575285.issue19251@psf.upfronthosting.co.za>
2016-01-08 00:19:13pitroulinkissue19251 messages
2016-01-08 00:19:13pitroucreate