Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

compute mean over y for same x numpy

import numpy_indexed as npi
x = np.concatenate([x1,x2,x3,x4])
y = np.concatenate([y1,y2,y3,y4])
x_unique, y_mean = npi.group_by(x).mean(y)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compute #numpy
ADD COMMENT
Topic
Name
4+7 =