

def test_var():
    ((chunk, chunk_expr), (agg, agg_expr)) = split(t, t.amount.var())
    assert (chunk.schema == t.schema)
    assert agg.isidentical(summary(x=chunk.amount.sum(), x2=(chunk.amount ** 2).sum(), n=chunk.amount.count(), keepdims=True))
    assert isrecord(agg.dshape.measure)
    assert agg_expr.isidentical(((agg.x2.sum() / agg.n.sum()) - ((agg.x.sum() / agg.n.sum()) ** 2)))

dataset/ETHPy150Open blaze/blaze/blaze/expr/tests/test_split.py test_var/VarMisuse@48/54 `chunk_expr`->`agg`