MCPcopy Create free account
hub / github.com/PythonOT/POT / median

Method median

ot/backend.py:3078–3085  ·  view source on GitHub ↗
(self, a, axis=None)

Source from the content-addressed store, hash-verified

3076 return tnp.mean(a, axis=axis)
3077
3078 def median(self, a, axis=None):
3079 warnings.warn(
3080 "The median is being computed using numpy and the array has been detached "
3081 "in the Tensorflow backend."
3082 )
3083 a_ = self.to_numpy(a)
3084 a_median = np.median(a_, axis=axis)
3085 return self.from_numpy(a_median, type_as=a)
3086
3087 def std(self, a, axis=None):
3088 return tnp.std(a, axis=axis)

Callers

nothing calls this directly

Calls 3

to_numpyMethod · 0.80
from_numpyMethod · 0.80
medianMethod · 0.45

Tested by

no test coverage detected