How can I avoid the for loop in this numpy operation and create one single array as output that looks as follows:
import numpy as np
c=(np.random.rand(12,5)*12).round()
for n in np.arange(12):
print (np.sum(c==n, axis=1))
It's important that everything stays in numpy as speed is of great importance.
printcommand in the loop related to the single array you want as output?