diff --git a/packages/vaex-core/vaex/agg.py b/packages/vaex-core/vaex/agg.py index 9fa1fa2ee7..587f99d411 100644 --- a/packages/vaex-core/vaex/agg.py +++ b/packages/vaex-core/vaex/agg.py @@ -520,7 +520,7 @@ def finish(sum_moment1, sum_moment2, sum_moment3, sum_moment4, count): class AggregatorDescriptorStd(AggregatorDescriptorVar): def finish(self, value): - return value**0.5 + return np.abs(value)**0.5 @register def count(expression='*', selection=None, edges=False): diff --git a/packages/vaex-core/vaex/dataframe.py b/packages/vaex-core/vaex/dataframe.py index a744d70291..ef4a467079 100644 --- a/packages/vaex-core/vaex/dataframe.py +++ b/packages/vaex-core/vaex/dataframe.py @@ -1164,7 +1164,7 @@ def std(self, expression, binby=[], limits=None, shape=default_shape, selection= """ @delayed def finish(var): - return var**0.5 + return np.abs(var)**0.5 return self._delay(delay, finish(self.var(expression, binby=binby, limits=limits, shape=shape, selection=selection, delay=True, progress=progress))) @docsubst