Open ev-br opened 1 year ago
One smelly thing is https://github.com/ev-br/scpdt/blob/main/scpdt/impl.py#L317 : would be better to not create ragged arrays internally at all.
Probably best to wait out until NumPy 2.0; then make sure it all works on both 1.x and 2.0, and only then go trim the fat.
As a data point, I tried removing (in https://github.com/scipy/scipy_doctest/pull/173) the want == got
check from https://github.com/scipy/scipy_doctest/blob/main/scipy_doctest/impl.py#L395 (which is where "this should be done exactly as written" comment comes from). It immediately causes some breakage in NumPy when IIRC comparing non-trivial dtypes: those are not handled by allclose
and the check feel down to the literal white-space sensitive vanilla doctest comparison.
The implementation of DTChecker has several "this needs to be done exactly like this" comments. On the contrary, some of these may be possible to simplify/streamline. However, this code has grown to account for actual usage in existing codebases, so this maintenance has a prerequisite of correctly testing at least numpy and scipy documentation.