Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7412 closed defect (duplicate)

from_lehmer_code modifies its argument

Reported by: ylchapuy Owned by: mhansen
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: combinatorics Keywords:
Cc: hivert Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Here is the problem:

sage: L = [0,0,0]
sage: sage.combinat.permutation.from_lehmer_code( L )
[1, 2, 3]
sage: L
[1, 1, 1]

Attachments (1)

trac_7412-lehmer.patch (1.1 KB) - added by ylchapuy 11 years ago.
need #7011

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by hivert

Hi Yann !

Thanks for the report ! Are you working on it ? The fix is rather trivial and I'm not in the mood for racing with you to get the first patch :-) By the way, thanks for putting me in CC, but it is better to put all the sage-combinat group for all these problem.



Changed 11 years ago by ylchapuy

need #7011

comment:2 Changed 11 years ago by ylchapuy

  • Status changed from new to needs_review

Hi Florent,

Here is the patch. Sorry for the CC, next time I'll follow your advice.



comment:3 Changed 11 years ago by hivert

  • Status changed from needs_review to positive_review

The patch is ok and ready to go but I don't see any dependence with #7011... Maybe you meant #7411, but there is no problem with it. The two patches do commute.



comment:4 Changed 11 years ago by ylchapuy

Oups, yes I meant #7411. Thanks for the review.

comment:5 Changed 11 years ago by ylchapuy

  • Resolution set to duplicate
  • Status changed from positive_review to closed

I don't know if duplicate is the right word, but the patch in #7414 solves this problem as well, but improve also the performance. Sometimes it's useful to think a little bit more...


comment:6 Changed 11 years ago by mvngu

  • Milestone changed from sage-combinat to sage-duplicate/invalid/wontfix
Note: See TracTickets for help on using tickets.