Message257728
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) |
|
Date |
User |
Action |
Args |
2016-01-08 00:19:13 | pitrou | set | recipients:
+ pitrou, gvanrossum, georg.brandl, rhettinger, terry.reedy, vstinner, christian.heimes, Ramchandra Apte, martin.panter, serhiy.storchaka, josh.r |
2016-01-08 00:19:13 | pitrou | set | messageid: <1452212353.45.0.425242575285.issue19251@psf.upfronthosting.co.za> |
2016-01-08 00:19:13 | pitrou | link | issue19251 messages |
2016-01-08 00:19:13 | pitrou | create | |
|