The COO form formats a complex column through _format_float_column, where
display.chop_threshold compares each value's magnitude. Two crashes hid
there, found by an overnight differential fuzz against the pandas
renderer:
- abs() of a python complex raises OverflowError for finite components
near the float max, where numpy's abs returns inf. pandas therefore
never chops such a value and renders the object fine; the pandas-free
path crashed. Treat an overflowing magnitude as never chopped.
Byte-identity for this case is restored, verified against the pandas
renderer at 6f1eb02 (repr and HTML hashes equal).
- A value that actually chops was replaced with float 0.0, which puts a
j-less string into the complex column, and _trim_zeros_complex cannot
parse that (IndexError). pandas 3.0.3 has the same bug in its own chop
path (pandas.io.formats.format._trim_zeros_complex raises the same
IndexError on the same input), so byte-identity here means identity
with a crash. Chop to the value's own type of zero instead: the
chopped cell renders 0.000000e+00+0.000000e+00j and the object reprs
where pandas cannot.
The second point is a deliberate, documented divergence from pandas,
reachable only with display.chop_threshold set on a complex dtype.
Stacked on #619. An overnight differential fuzz of #605's pandas-free renderer against the real pandas renderer (34,618 repr/HTML comparisons across 17,309 case pairs) found a crash family in the display.chop_threshold path for complex dtypes, reachable in the COO (long) display form:
Gates: full pinned suite 1114 passed / 145 skipped; pre-commit all hooks pass. The broader fuzz findings (all in non-crash territory) are written up in the overnight stack report for the maintainer meeting.