I would like to find a numpy array with don't cares like:
b = np.array(
[
[0,0,-1,-1]
]
, dtype=np.int8
)
where -1 is the don't care, and find it in arrays like:
a = np.array(
[
[1,2,0,0],
[0,1,2,0],
[0,0,1,2],
[2,0,0,1],
[3,4,0,0],
[0,3,4,0],
[0,0,3,4],
[4,0,0,3]
]
, dtype=np.int8
)
and return the row index's 2 and 6 for the above sample
the a array are normally around 1000 rows shape(~1000, 4)
note the b array can have don't cares any where or none, examples:
b = np.array(
[
[0,3,4,-1]
]
, dtype=np.int8
)
# --OR--
b = np.array(
[
[2,-1,0,1]
]
, dtype=np.int8
)
# --OR--
b = np.array(
[
[2,-1,-1,-1]
]
, dtype=np.int8
)
# etc...