How can I replace array values in place if I don't know the axis beforehand?
For example, if I wanna do something like
arr[:,5]
but I don't know the axis beforehand and want to make it general I can use take:
arr.take(5, axis=1)
and it'll work.
However, if I want to something like
arr[:,5]=10
but I don't know the axis beforehand, how can I do it? I obviously can't do arr.take(5, axis=1) = 10, and I can't find a function to do it.
The function that comes the closest (that I found) would be np.put(), but I don't think it can be done with that.