nicetoolbox.utils.check_and_exception.check_zeros

nicetoolbox.utils.check_and_exception.check_zeros(arr: ndarray) None[source]

Check if any vectors in the last dimension of an array are zero vectors.

Args

arr (ndarray): The input array.

Raises

AssertionError: If there are any zero vectors found in the last dimension of the array.

Examples >>> arr_3d_example = np.random.randint(0, 255, (10, 10, 3)) >>> check_zeros(arr_3d_example)