Access n-th dimension in python [duplicate]

You can use np.take.
For example:

b.take(index, axis=5)

Leave a Comment