def _pymca_average(xdats, zdats):
    if HAS_SIMPLEMATH:
        sm = SimpleMath.SimpleMath()
        print("Merging data...")
        return sm.average(xdats, zdats)
    else:
        raise NameError("SimpleMath is not available -- this operation cannot be performed!")
call to SimpleMath.average() method from PyMca/SimpleMath.py
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/specfiledata.py/_pymca_average