Issue
I have a numpy array of shape (samples, sequence_length, number_of_features)
e.g. (10000, 1024, 2)
I want to break this down into (10000, 1024, 1)
where I am only taking the first feature - what is the most efficient way of doing this with numpy without unravelling the array?
Solution
Try this:
np.take(arr, indices=[0], axis=2)
Answered By - lebi376
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.