python - How to interleave two matrices in numpy without copying values? -


in pygame i'd interleave 2 surfaces before displaying them on screen that:

  1. odd numbered lines contain pixels surface a,
  2. 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

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -