-
Notifications
You must be signed in to change notification settings - Fork 34
Closed
Description
Consider:
>>> 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels