Probably just `assert_equal(A[Z1].shape, (0,))`. But I somewhat think the old code was correct, and the tests just dependend on random numbers (i.e. just adding the actually out of bounds values to `Z` and `Y` is maybe neough?