From daa60c72ac229abe8f36bc13a44b3cabf9042165 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 8 Oct 2017 09:25:13 -0500 Subject: [PATCH] Make sure Barvinok-based count() returns a PwQPolynomial of the right space --- loopy/statistics.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/loopy/statistics.py b/loopy/statistics.py index 233cfe5e8..88d7ec328 100755 --- a/loopy/statistics.py +++ b/loopy/statistics.py @@ -1000,6 +1000,9 @@ def add_assumptions_guard(kernel, pwqpolynomial): def count(kernel, set, space=None): try: + if space is not None: + set = set.align_params(space) + return add_assumptions_guard(kernel, set.card()) except AttributeError: pass -- GitLab