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

DefaultGaussRAI.compute() reports cryptic IAE for sigma dimension mismatch #646

Open
gselzer opened this issue Sep 1, 2022 · 1 comment
Assignees
Labels

Comments

@gselzer
Copy link
Contributor

gselzer commented Sep 1, 2022

As reported in this zulip chat, we get a cryptic IllegalArgumentException when we call DefaultGaussRAI.compute() with a sigmas whose length does not match the input dimensionality. We should try our best to mitigate or fix this.

Here are my suggestions for fixes.

But, there is a third option: using Contingent! We can't use this when porting the fix to ImageJ Ops2, but it could help avoid the issue in this project.

@gselzer gselzer added the bug label Sep 1, 2022
@gselzer gselzer self-assigned this Sep 1, 2022
@ctrueden
Copy link
Member

ctrueden commented Sep 1, 2022

I suggest not using Contingent, because it will be replacing one cryptic error message with a different cryptic error message (no matching ops). I favor doing a length check and throwing IllegalArgumentException if it doesn't match. And also: if an array of length 1 is passed, expand it to an array of length N with all equal values.

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

No branches or pull requests

2 participants