import numpy as np
array_nums1 = np.arange(20).reshape(4,5)
print("Original arrays:")
print(array_nums1)
result = array_nums1[(array_nums1>6) & (array_nums1%3==0)]
print("\nItems greater than 6 and a multiple of 3 of the said array:")
print(result)
Sample Output:
Original arrays:
[[ 0 1 2 3 4]
[ 5 6 7 8 9]
[10 11 12 13 14]
[15 16 17 18 19]]
Items greater than 6 and a multiple of 3 of the said array:
[ 9 12 15 18]
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer