-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Change ImageLike and VolumeLike deprecation warnings to errors #4685
base: master
Are you sure you want to change the base?
Conversation
src/conversions.jl
Outdated
function convert_arguments(::VolumeLike, x::RealVector, y::RealVector, z::RealVector, f::Function) | ||
if !applicable(f, x[1], y[1], z[1]) | ||
error("You need to pass a function with signature f(x, y, z). Found: $f") | ||
end | ||
# Verify grid regularity | ||
is_regularly_spaced(x) || throw_range_error(x, "x", VolumeLike) | ||
is_regularly_spaced(y) || throw_range_error(y, "y", VolumeLike) | ||
is_regularly_spaced(z) || throw_range_error(z, "z", VolumeLike) | ||
|
||
_x, _y, _z = ntuple(Val(3)) do i | ||
A = (x, y, z)[i] | ||
return reshape(A, ntuple(j -> j != i ? 1 : length(A), Val(3))) | ||
end | ||
# TODO only allow unitranges to map over since we dont support irregular x/y/z values | ||
|
||
return (map(to_endpoints, (x, y, z))..., el32convert.(f.(_x, _y, _z))) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this didn't previously warn and now errors (if the array spacing is not approximately the same)
Benchmark ResultsSHA: bad9945e84701b402b357840e29bb963508319c3 Warning These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking. |
Description
TODO:
Type of change
Checklist
AddedUpdated unit tests for new algorithms, conversion methods, etc.AddedUpdated reference image tests for new plotting functions, recipes, visual options, etc.