how to combine two arrays in python
# concatenate 2 numpy arrays: row-wise
>np.concatenate((array2D_1, array2D_2))
array([[ 0, 1, 2],
[ 3, 4, 5],
[ 6, 7, 8],
[10, 11, 12],
[13, 14, 15],
[16, 17, 18]])
how to combine two arrays in python
# concatenate 2 numpy arrays: row-wise
>np.concatenate((array2D_1, array2D_2))
array([[ 0, 1, 2],
[ 3, 4, 5],
[ 6, 7, 8],
[10, 11, 12],
[13, 14, 15],
[16, 17, 18]])
python section of array compare
def binary_isArrayInArray(main_array, compare_array):
for i in range(len(main_array)-len(compare_array)):
temp_array = []
for j in range(len(compare_array)):
temp_array.append(main_array[i + j])
print(f'{temp_array} xor {compare_array} = {np.any(np.logical_xor(temp_array, compare_array))}')
if np.any(np.logical_xor(temp_array, compare_array)) == False: return True
return False
#takes in two binary arrays and looks wether the second one is part of the first one
python compare two arrays
a = [1, 2, 3, 4]
b = [5, 6, 7]
c = [1, 2, 3, 4]
a == b # False
a == c # True
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us