import numpy as np
x = np.random.randint(0,2,6)
print("First array:")
print(x)
y = np.random.randint(0,2,6)
print("Second array:")
print(y)
print("Test above two arrays are equal or not!")
array_equal = np.allclose(x, y)
print(array_equal)
Sample Output:
First array:
[1 0 0 0 1 0]
Second array:
[0 0 1 1 0 1]
Test above two arrays are equal or not!
False
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer