Skip to content

Initialize arrays with NaN for easier error detection #90

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

andreasnoack
Copy link
Contributor

The NaNs will make it immediately obvious when some memory hasn't been properly set. I had a case where zero was the correct value so most often the random memory happened to have the correct value. Except on CI where it received memory that made the tests fail.

@tpapp
Copy link
Owner

tpapp commented Mar 30, 2022

Hmm, I was hoping we would catch errors with random tests, but I do see the rationale behind doing something like this.

I am wondering if this would work for float types that have no equivalent of NaN though. This is technically possibly in Julia for a custom <: AbstractFloat type.

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

Successfully merging this pull request may close these issues.

2 participants