Input
array([[10, 11, 12, 13, 26, 28, 11],
[ 4, 9, 19, 20, 21, 26, 12],
[ 1, 7, 10, 23, 28, 32, 16],
[ 4, 6, 7, 10, 13, 25, 3],
[ 4, 6, 15, 17, 30, 31, 16]])
test = np.array([10, 11, 12, 13, 26, 28, 11])
Trying
def check(test,array):
for i in array:
if np.array_equal(i,test):
print('in')
break
print('not in')
Is there any simple method without using for...in...if...else structure?