KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
>>> arr = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]]) >>> arr array([[ 1, 2, 3, 4], [ 5, 6, 7, 8], [ 9, 10, 11, 12]]) I am deleting the 3rd column as >>> np.hstack(((np.delete(arr, np.s_[2:], 1)),(np.delete(arr, np.s_[:3],1)))) array([[ 1, 2, 4], [ 5, 6, 8], [ 9, 10, 12]]) Are there any better way ? Please consider this to be a novice question.
Tags (comma-separated)
Save Edits
Cancel