Skip to content

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

Merged
jvkersch merged 1 commit into
masterfrom
fix/shape-of-list-or-tuple
Nov 4, 2019
Merged

Fix attempts to get the .shape attribute of a list or tuple.#487
jvkersch merged 1 commit into
masterfrom
fix/shape-of-list-or-tuple

Conversation

@mdickinson
Copy link
Copy Markdown
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

Comment thread chaco/horizon_plot.py
bands = array(self.color_mapper._get_color_bands())

with gc:
with gc:
Copy link
Copy Markdown
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