File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -394,7 +394,8 @@ def __repr__(self):
394
394
f" cell_order='{ self .cell_order } ',\n "
395
395
f" tile_order={ repr (self .tile_order )} ,\n "
396
396
)
397
- output .write (f" capacity={ self .capacity } ,\n " )
397
+ if self .sparse :
398
+ output .write (f" capacity={ self .capacity } ,\n " )
398
399
output .write (f" sparse={ self .sparse } ,\n " )
399
400
if self .sparse :
400
401
output .write (f" allows_duplicates={ self .allows_duplicates } ,\n " )
@@ -434,8 +435,9 @@ def _repr_html_(self):
434
435
output .write ("<tr><th>Tile Order</th></tr>" )
435
436
output .write (f"<tr><td>{ self .tile_order } </td></tr>" )
436
437
437
- output .write ("<tr><th>Capacity</th></tr>" )
438
- output .write (f"<tr><td>{ self .capacity } </td></tr>" )
438
+ if self .sparse :
439
+ output .write ("<tr><th>Capacity</th></tr>" )
440
+ output .write (f"<tr><td>{ self .capacity } </td></tr>" )
439
441
440
442
output .write ("<tr><th>Sparse</th></tr>" )
441
443
output .write (f"<tr><td>{ self .sparse } </td></tr>" )
You can’t perform that action at this time.
0 commit comments