@@ -2432,7 +2432,7 @@ def as_table(self, maxlines=None, edgeitems=5, light=False, wide=True, value_nam
2432
2432
# returns next line (labels of N-1 first axes + data)
2433
2433
yield list (tick ) + dataline .tolist ()
2434
2434
2435
- def dump (self , header = True , wide = True , value_name = 'value' ):
2435
+ def dump (self , header = True , wide = True , value_name = 'value' , light = False ):
2436
2436
"""Dump array as a 2D nested list
2437
2437
2438
2438
Parameters
@@ -2446,6 +2446,9 @@ def dump(self, header=True, wide=True, value_name='value'):
2446
2446
value_name : str, optional
2447
2447
Name of the column containing the values (last column) when `wide=False` (see above).
2448
2448
Not used if header=False. Defaults to 'value'.
2449
+ light : bool, optional
2450
+ Whether or not to hide repeated labels. In other words, only show a label if it is different from the
2451
+ previous one. Defaults to False.
2449
2452
2450
2453
Returns
2451
2454
-------
@@ -2455,7 +2458,7 @@ def dump(self, header=True, wide=True, value_name='value'):
2455
2458
# flatten all dimensions except the last one
2456
2459
return self .data .reshape (- 1 , self .shape [- 1 ]).tolist ()
2457
2460
else :
2458
- return list (self .as_table (wide = wide , value_name = value_name ))
2461
+ return list (self .as_table (wide = wide , value_name = value_name , light = light ))
2459
2462
2460
2463
# XXX: should filter(geo=['W']) return a view by default? (collapse=True)
2461
2464
# I think it would be dangerous to make it the default
0 commit comments