python - How to interleave two matrices in numpy without copying values? -
in pygame
i'd interleave 2 surfaces before displaying them on screen that:
- odd numbered lines contain pixels surface a,
- even numbered lines contain pixels surface b.
in pygame
docs more efficient pixelarray
, surface represented numpy
array. did copying data new array, result still slow.
is there more efficient way (i suppose using numpy
method) pixel data accessed in original matrices, without copying every pixel?
Comments
Post a Comment