say we have
a = numpy.arange(25).reshape(5,5)
> array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14],
[15, 16, 17, 18, 19],
[20, 21, 22, 23, 24]])
By going
numpy.where(a[1])
> array([0, 1, 2, 3, 4])
and then something like
a[1][numpy.where(a[1])]
> array([5, 6, 7, 8, 9])
I can select the horizontal rows of an array and the respective values, However how can I have a similar where condition to select only specific vertical columns
ie.
numpy.where(condition)
> array([1, 6, 11, 16, 21])