[NumPy-Tickets] [NumPy] #1970: have array list number of omitted items rather than ellipsis

NumPy Trac numpy-tickets@scipy....
Fri Oct 28 14:40:47 CDT 2011


#1970: have array list number of omitted items rather than ellipsis
-------------------------+--------------------------------------------------
 Reporter:  AlanFrankel  |       Owner:  somebody   
     Type:  enhancement  |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  Other        |     Version:  1.6.0      
 Keywords:               |  
-------------------------+--------------------------------------------------
 Currently, the display for an array looks like this:

 [[   0.      0.64    0.64 ...,   61.    278.      1.  ]
  [   0.      0.      0.   ...,    6.     21.      1.  ]
  [   0.      0.      0.   ...,    9.     23.      1.  ]
  ...,
  [   0.      0.      0.   ...,    5.     11.      0.  ]
  [   0.      0.      0.   ...,   11.     79.      0.  ]
  [   0.      0.      0.65 ...,    5.     40.      0.  ]]

 It would be helpful if instead of the ellipses, we had the number of
 missing items:

 [[   0.      0.64    0.64 {12x}   61.    278.      1.  ]
  [   0.      0.      0.   {12x}    6.     21.      1.  ]
  [   0.      0.      0.   {12x}    9.     23.      1.  ]
  {205x}
  [   0.      0.      0.   {12x}    5.     11.      0.  ]
  [   0.      0.      0.   {12x}   11.     79.      0.  ]
  [   0.      0.      0.65 {12x}    5.     40.      0.  ]]

 Here, you can tell at a glance that the array is 211 rows by 18 columns.
 Otherwise, you need a separate command to list the array size.

 It could be debated whether {12x} or {..12..} or <..12..> or something
 else would be best for symbolizing the omitted 12 items, but any of those
 choices would be fine for me.

 I personally would always prefer this style of display to the one with
 ellipses. However, even if you made this a nondefault option, that would
 make me happy.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1970>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list