Fastest way to convert categorical data with 5 classes to 3 classes (Numpy array)

后端 未结 0 792
余生分开走
余生分开走 2020-12-13 04:07

I have an array of shape(5000,5), where 0 = [1,0,0,0,0] and so one till 4999 = [0,0,0,0,1].

I want to convert this to an array of 3 where [1,0,0,0,0] becomes [1,0,0]

相关标签:
回答
  • 消灭零回复
提交回复
热议问题