#storage for particles vels = np.zeros((NP,3)) for s in range (NP): v1 = maxw1d(vth) v2 = maxw1d(vth) v3 = maxw1d(vth)+vdrift mag = np.sqrt(v1*v1+v2*v2+v3*v3) #bin result, add to nearest bin = np.floor((mag-bin_min)/dbin+0.5) if (bin<NUM_BINS): bins[bin] = bins[bin] + 1 ..................................................... bins[bin] = bins[bin] + 1 IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
1.4m articles
1.4m replys
5 comments
56.9k users