Opened 6 years ago

Closed 6 years ago

#20768 closed defect (fixed)

Allow pp of tableau to work with entries with more than 3 digits

Reported by: tscrim Owned by: sage-combinat
Priority: major Milestone: sage-7.3
Component: combinatorics Keywords: days74
Cc: sage-combinat, darij, chapoton, andrew.mathas Merged in:
Authors: Travis Scrimshaw Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: 0ae9dca (Commits, GitHub, GitLab) Commit: 0ae9dca9aaad845557f3b69877fc2165a7f1813b
Dependencies: Stopgaps:

Status badges

Description

Currently, the pretty printing of tableau does not work with entries with more than 3 digits:

sage: T = Tableau([[1523, 1, 2],[1,12341, -2]])
sage: T.pp()
1523  1  2
  112341 -2

We fix that here.

Change History (8)

comment:1 Changed 6 years ago by tscrim

  • Branch set to public/combinat/fix_tableau_pp-20768
  • Cc andrew.mathas added
  • Commit set to 70122483465001781c73c8805151e208e880d238
  • Status changed from new to needs_review

New commits:

7012248Fixing _repr_diagram and pp for tableau (tuples).

comment:2 Changed 6 years ago by tscrim

I also went through and updated all of the places pp was called so the output matched exactly, which is why there are so many changes.

comment:3 Changed 6 years ago by chapoton

  • maybe in
    str_tab = reversed(str_tab)
    

use instead .reverse ?

  • maybe in
    +        str_tt = [T._repr_diagram().split('\n') for T in self]
    +        if TableauTuples.global_options('convention') == "French":
    +            for T_str in str_tt:
    +                T_str.reverse()
    +        widths = [len(T_str[0]) for T_str in str_tt]
    

compute the widths before doing the French reversion ? otherwise T_str[0] may be short ?

comment:4 Changed 6 years ago by chapoton

  • Status changed from needs_review to needs_work

3 failing doctests in crystals/kirillov_reshetikhin

comment:5 Changed 6 years ago by git

  • Commit changed from 70122483465001781c73c8805151e208e880d238 to 0ae9dca9aaad845557f3b69877fc2165a7f1813b

Branch pushed to git repo; I updated commit sha1. New commits:

0ae9dcaFixing doctests in KR.py.

comment:6 Changed 6 years ago by tscrim

  • Status changed from needs_work to needs_review

Fixed.

comment:7 Changed 6 years ago by chapoton

  • Reviewers set to Frédéric Chapoton
  • Status changed from needs_review to positive_review

ok, good enough

comment:8 Changed 6 years ago by vbraun

  • Branch changed from public/combinat/fix_tableau_pp-20768 to 0ae9dca9aaad845557f3b69877fc2165a7f1813b
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.