Answers for "compute mean over y for same x numpy"

0

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)
Posted by: Guest on April-11-2021

Python Answers by Framework

Browse Popular Code Answers by Language