Open gselzer opened 2 years ago
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.
As reported in this zulip chat, we get a cryptic
IllegalArgumentException
when we callDefaultGaussRAI.compute()
with asigmas
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.