-
-
Couldn't load subscription status.
- Fork 1k
bugfix for draw_property_layer #2639
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
Conversation
|
Performance benchmarks:
|
|
@Sahil-Chhoker since you put in the original issue, would you like to review? |
|
@EwoutH Sure, I would love to! |
|
|
||
| data = layer.data.astype(float) if layer.data.dtype == bool else layer.data | ||
| width, height = data.shape # if space is None else (space.width, space.height) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest adding these two lines:
data = data.T
height, width = data.shapeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed your comments in a slightly different way but the effect is the same
|
This was a fairly simple fix, @EwoutH this PR can be merged! |
This closes #2635. Axes.imshow uses row, col, while our property layer data is x, y. This solves this by transposing the data in the axes.imshow command.