-
Notifications
You must be signed in to change notification settings - Fork 64
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
color_bins_layer breaks argument should take in iterables #1146
Comments
@andy-esch I'm no expert in this area so forgive me if this is totally out of nowhere... while reading this, remembered when I was working on the sdsc demo cartography that Giulia had used custom breaks as a numpy array and it worked: not sure this is totally related, but just wanted to post in case. thanks! |
I guess this goes to your point of converting to a |
Thanks for the response, @makella! Yeah, looks like she has the same issue of needing to convert it to a python list first. |
out of curiosity, did you try this without the |
I tried passing a numpy array for the breaks argument of a color_bins_layer helper:
And received the following error:
My expectation is that breaks can be an ordered iterable (list, tuple, numpy array). It works fine with list and tuple, but the error above leads me to think that it's testing for whether it's a list or tuple (and not a string). Since numpy has such a common use in peoples workflows for calculating custom arrays, we should support it too. A the very least we need to improve the error message that it should be a list/tuple or one of the named strings.
The text was updated successfully, but these errors were encountered: