I have digital matrix consisting of 0s and 1s. Example:
p=[[1 0 0 1 0] [0 0 0 0 0] ... [1 1 1 1 1] [0 0 0 1 1]]The rows of this numpy matrix signify time separated measurements of 5 element bursts of data. Each column signifies the channel of the measurement:
channels=[A B C D E]I need to map channels on to p so I get:
q=[[A None None D None] [None None None None None] ... [A B C D E] [None None None D E]]What is the most pythonic way to map p to q?