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

Projects
None yet
2 participants
@philippjfr
Member

philippjfr commented Oct 31, 2016

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)]

This comment has been minimized.

@jbednar

jbednar Oct 31, 2016

Member

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?

This comment has been minimized.

@philippjfr

philippjfr Oct 31, 2016

Member

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

This comment has been minimized.

@jbednar

jbednar Nov 1, 2016

Member

Ok, I guess that works out then.

@jbednar jbednar merged commit e879523 into master Nov 1, 2016

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.05%) to 75.715%
Details
s3-reference-data-cache Test data is cached.
Details

@jbednar jbednar deleted the datashader_extensible branch Nov 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment