2808 explained code solutions for 75 technologies


python-numpyCheck if all array elements are True


import numpy as np

a = np.array([True, True, True])

all_true = a.all()ctrl + c
import numpy as np

load Numpy module for Python

np.array

declare Numpy array

.all()

will return True if all array of a given element are True