Reputation: 131
I have the following array structure.
array([[ 0.3, 0.1, 0. , 1. , 0. , 0. , 2.7],
[ 0.5, 0.5, 0. , 0. , 1. , 0. , 6. ],
[ 0.6, 0.4, -1. , 0. , 0. , 1. , 6. ]])
How can I change to the following structure?
array([[ 0.3, 0.1, 0. , 1. , 2.7],
[ 0.5, 0.5, 0. , 0. , 6. ],
[ 0.6, 0.4, -1. , 0. , 6. ]])
Upvotes: 0
Views: 130
Reputation: 3967
Assuming array is stored in a variable arr
use indexing:
arr[:,[0, 1, 2, 3, 6]]
Upvotes: 2