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

Fix attempts to get the .shape attribute of a list or tuple. #487

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Oct 30, 2019

This PR fixes an obvious bug in the LinearMapper code, where we attempt to look up the shape attribute of a list or a tuple.

Code ref:

if isinstance(data_array, (tuple, list, ndarray)):
x = empty(data_array.shape)
x.fill(self.low_pos)
return x

@@ -82,7 +80,7 @@ def _render(self, gc, points):
# Get color bands
bands = array(self.color_mapper._get_color_bands())

with gc:
with gc:
Copy link
Member Author

Choose a reason for hiding this comment

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

My editor made these fixes, by auto-trimming trailing whitespace. I can revert them if that's preferred.

@jvkersch jvkersch merged commit 021a921 into master Nov 4, 2019
@jvkersch jvkersch deleted the fix/shape-of-list-or-tuple branch November 4, 2019 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants