We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If all array values are equal, using get with the :extrema option gives an error.
get
:extrema
get(colorschemes[:sunset], fill(0.3,20,20), :extrema) ERROR: InexactError: trunc(Int64, NaN)
It would be nice if this edge case was handled.
The text was updated successfully, but these errors were encountered:
Hi Simon (I remember your amazing contributions to the Mathematica Stack Exchange?)...
Looks like the problem is with remap here
remap
so:
remap(x, 0.3, 0.3, 1, 10) 2-element Array{Float64,1}: NaN NaN
I suppose it could be fixed by inserting
iszero(first(rangescale) - last(rangescale)) && error("Empty rangescale: $(rangescale)")
at the start of that function, without too much of a penalty...
Sorry, something went wrong.
Hi Cormullion, yes that's me. I haven't been active there for a while, most of my hobby programming is in Julia these days.
I'd argue for get to still return an image (albeit a boring one) when the array values are all equal. Maybe use the midpoint of the colour scheme?
6d47694
No branches or pull requests
If all array values are equal, using
get
with the:extrema
option gives an error.It would be nice if this edge case was handled.
The text was updated successfully, but these errors were encountered: