Skip to content

Instantly share code, notes, and snippets.

View schlameel's full-sized avatar

Schlameel schlameel

  • US
View GitHub Profile
@schlameel
schlameel / deinterleave.py
Last active November 8, 2023 00:10
De-interleave data using numpy
import numpy as np
CHANNEL_COUNT = 2
frames = np.array([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1])
deinterleaved = [frames[idx::CHANNEL_COUNT] for idx in range(CHANNEL_COUNT)]
print(deinterleaved[0])
# prints "[0 0 0 0 0 0 0 0 0 0]"
print(deinterleaved[1])
# prints "[1 1 1 1 1 1 1 1 1 1]"

Keybase proof

I hereby claim:

  • I am schlameel on github.
  • I am schlameel (https://keybase.io/schlameel) on keybase.
  • I have a public key ASBGidbxwdQ8_gO930Inqc3ivv74si7ded6jfY2iGFWJ3Ao

To claim this, I am signing this object: