I'm trying to compare the values from a two dimensional arrays within a nested for loop and I can't seem to get the right relational operation in this situation.
So I'm looping through two dimensional arrays and comparing its values to values in another one dimensional array and I'm having a really interesting day.
import numpy as np
packetsDb = np.empty((0,4))
head = [['AAA', 'BBB', 'CCC', 'DDD']]
packet1 = [[255, 256, 257, 258]]
packet2 = [[255, 256, 257, 259]]
test = [255, 256, 257, 259]
packetsDb = np.append(packetsDb, np.array(head), axis=0)
packetsDb = np.append(packetsDb, np.array(packet1), axis=0)
packetsDb = np.append(packetsDb, np.array(packet2), axis=0)
for x in packetsDb:
for y in x:
print(test[0], y, test[0] == y)
//Result
255 AAA False
255 BBB False
255 CCC False
255 DDD False
255 255 False //Whats happening here
255 256 False
255 257 False
255 258 False
255 255 False //and here
255 256 False
255 257 False
255 259 False