I have the following array of shape(5,2,3), which is a collection of 2 * 3 arrays.
a = array([[[ 0, 2, 0],
[ 3, 1, 1]],
[[ 1, 1, 0],
[ 2, 2, 1]],
[[ 0, 1, 0],
[ 3, 2, 1]],
[[-1, 2, 0],
[ 4, 1, 1]],
[[ 1, 0, 0],
[ 2, 3, 1]]])
1) How can I check if there exists a 2 * 3 array in this array of arrays where at least one element is negative in it?
#which is this:
[[-1, 2, 0],
[ 4, 1, 1]]
2) After that how can I remove the above found 2 * 3 array from a?
A vectorized implementation is much appreciated but looping is fine too.