Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit the DTChecker implementation, simplify where possible #79

Open
ev-br opened this issue Jul 25, 2023 · 3 comments
Open

Audit the DTChecker implementation, simplify where possible #79

ev-br opened this issue Jul 25, 2023 · 3 comments

Comments

@ev-br
Copy link
Member

ev-br commented Jul 25, 2023

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.

@ev-br
Copy link
Member Author

ev-br commented Feb 26, 2024

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.

@ev-br
Copy link
Member Author

ev-br commented Mar 8, 2024

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.

@ev-br
Copy link
Member Author

ev-br commented Aug 24, 2024

As a data point, I tried removing (in #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant