-
Notifications
You must be signed in to change notification settings - Fork 80
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
Provide a kwarg to turn off data healthy check. #156
Comments
Does it not work for a static array?
|
I mean sometimes, it could be helpful to use a julia> isnan(SMatrix{2,2}(1.0, 2.0, 3.0, 5.0))
ERROR: MethodError: no method matching isnan(::SArray{Tuple{2,2},Float64,2,4})
Closest candidates are:
isnan(::BigFloat) at mpfr.jl:893
isnan(::Missing) at missing.jl:100
isnan(::Float16) at float.jl:537
...
Stacktrace:
[1] top-level scope at REPL[4]:1
julia> isnan(SVector{4}(1.0, 2.0, 3.0, 5.0))
ERROR: MethodError: no method matching isnan(::SArray{Tuple{4},Float64,1,4})
Closest candidates are:
isnan(::BigFloat) at mpfr.jl:893
isnan(::Missing) at missing.jl:100
isnan(::Float16) at float.jl:537
...
Stacktrace:
[1] top-level scope at REPL[5]:1
(@v1.4) pkg> st StaticArrays
Status `~/.julia/environments/v1.4/Project.toml`
[90137ffa] StaticArrays v0.12.3 |
Let's try to fix this :) Are you using something like a static array of static arrays? |
Sounds great, yes, I am using a static vector as the element. |
What are you using as the container? |
A regular array, I should probably write a MWE. |
That would be helpful. Can you use RecursiveArrayTools? |
I ran into this issue. I have a custom function LsqFit.check_data_health(::MyData, ::Any) end I imagine there is probably a more flexible way of erroring out such as waiting to do any LsqFit.jl/src/levenberg_marquardt.jl Lines 79 to 100 in 863bbca
|
Great tool!
For some user defined types, the following check would break for not having
isinf
andisnan
.An example is
StaticArray
. By overloading this check (so called prirating), everything works fine.I guess it would be good to provide a kwarg to allow user to switch off this check?
The text was updated successfully, but these errors were encountered: