Opened 2 years ago

Closed 14 months ago

#30602 closed defect (fixed)

Partitions_n.__iter__ creates partitions with int (instead of Integer) parts

Reported by: Martin Rubey Owned by:
Priority: major Milestone: sage-9.5
Component: combinatorics Keywords:
Cc: Merged in:
Authors: Mike Hansen Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 82e30dc (Commits, GitHub, GitLab) Commit: 82e30dce8070c28ff4dfaaca7c0f8cc03656c250
Dependencies: Stopgaps:

Status badges

Description

Several iterators over partitions return partitions whose parts are of type int instead of Integer:

sage: type(Partitions(3)[0][0])
<class 'int'>
sage: type(Partitions(3, length=3)[0][0])
<class 'int'>

sage: type(Partitions(3, max_part=3)[0][0])
<class 'sage.rings.integer.Integer'>

Change History (10)

comment:1 Changed 2 years ago by Matthias Köppe

Milestone: sage-9.2sage-9.3

comment:2 Changed 19 months ago by Matthias Köppe

Milestone: sage-9.3sage-9.4

Moving to 9.4, as 9.3 has been released.

comment:3 Changed 16 months ago by Matthias Köppe

Milestone: sage-9.4sage-9.5

comment:4 Changed 15 months ago by Mike Hansen

Branch: u/mhansen/partitions_n___iter___creates_partitions_with_int__instead_of_integer__parts

comment:5 Changed 15 months ago by Frédéric Chapoton

Commit: 82e30dce8070c28ff4dfaaca7c0f8cc03656c250

you should set to "needs review" if this is ready


New commits:

82e30dcTrac #30602: Use Integer when creating Partition objects from ZS1_* iterators

comment:6 Changed 15 months ago by Samuel Lelièvre

Authors: Mike Hansen

... and fill in author name (done now).

comment:7 Changed 14 months ago by Mike Hansen

Status: newneeds_review

Sorry -- I had been waiting for the patchbot build to run before marking it needs_review.

comment:8 Changed 14 months ago by Samuel Lelièvre

And the patchbot was waiting for the author field to be filled in. : )

comment:9 Changed 14 months ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

Good catch. LGTM.

comment:10 Changed 14 months ago by Volker Braun

Branch: u/mhansen/partitions_n___iter___creates_partitions_with_int__instead_of_integer__parts82e30dce8070c28ff4dfaaca7c0f8cc03656c250
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.