Skip to content
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

Small fixes and optimizations for datashader operations #963

Merged
merged 2 commits into from
Nov 1, 2016

Conversation

philippjfr
Copy link
Member

Includes various improvements/optimizations for the datashader operations avoiding making copies of the data, allowing different Element types to be used and providing an explicit color key dictionary.

@@ -259,6 +277,8 @@ def _process(self, element, key=None):
categories = array.shape[-1]
if not self.p.cmap:
pass
elif isinstance(self.p.cmap, dict):
shade_opts['color_key'] = self.p.cmap
elif isinstance(self.p.cmap, Iterable):
shade_opts['color_key'] = [c for i, c in
zip(range(categories), self.p.cmap)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm; datashader keeps the cmap and color_key options separate so that there can be a default for each one of them separately, but it looks like you are using cmap for both?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have a default cmap so it just ends up using the appropriate datashader default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I guess that works out then.

@jbednar jbednar merged commit e879523 into master Nov 1, 2016
@jbednar jbednar deleted the datashader_extensible branch November 1, 2016 00:17
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants