You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> c = fmpq_mpoly_ctx.get(('x'))
>>> x = c.gen(0)
>>> one = x - x + 1
>>> one.unused_gens()
('x',)
In contrast:
>>> zero = x - x
>>> zero.unused_gens()
()
This is quite unexpected. The documentation of unused_gens specifies that "a generator is unused if it’s maximum degree is 0":
>>> one.degrees()
(0,)
>>> zero.degrees()
(-1,)
Strictly speaking, zero.unused_gens meets this specification. However, it might be more natural to change the specification to "at most 0" (or explicitly point at the special case 0 in the documentation.
Activity
oscarbenjamin commentedon Feb 17, 2026
I think it is best just to fix this. I've opened gh-370
oscarbenjamin commentedon Feb 17, 2026
I've merged the fix. In about 30 minutes it should be possible to download a new nightly wheel from:
https://anaconda.org/channels/scientific-python-nightly-wheels/packages/python-flint/overview