-
Notifications
You must be signed in to change notification settings - Fork 99
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
Cleanup map_screen return types #726
Closed
Closed
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
1f7a059
make return types of map_screen consistent
aaronayres35 9e219a0
use np for numpy
aaronayres35 8eedf6c
flake8
aaronayres35 32f6c07
update cursor_tool.py to expect Nx2 array output from map_screen
aaronayres35 8861984
expect correct return type
aaronayres35 74175b8
add a regression test for 272
aaronayres35 9c85c5a
run same test on a couple more renderers
aaronayres35 ad93274
add a test for SegmentPlot which does its own thing
aaronayres35 527bdb9
add explicit map_screen specific test for ImagePlot
aaronayres35 db31b7b
test map screen on no data points ImagePlot
aaronayres35 206bc72
have Plot tests also test map_screen on no data points
aaronayres35 d85658a
Revert "use np for numpy"
aaronayres35 fabfc25
follow existing lead of using numpy / remove unneeded [0]
aaronayres35 8639b2d
add regression test for enthought/chaco#289
aaronayres35 48e7f9f
add comment
aaronayres35 77436ac
add regression test for 550
aaronayres35 e7fd534
flake8
aaronayres35 0bf267e
more updates
aaronayres35 8106488
Merge branch 'master' into cleanup-mapscreen
aaronayres35 9e6da2e
remove debugging print statement
aaronayres35 2f9a95a
clean up map_screen use in LinearMapper hittest method
aaronayres35 edcd163
Merge branch 'master' into cleanup-mapscreen
aaronayres35 a35b264
flake8
aaronayres35 58f3a00
be less strict in BaseXYPlot
aaronayres35 b961f4c
Merge branch 'master' into cleanup-mapscreen
aaronayres35 b8345bf
Merge branch 'master' into cleanup-mapscreen
aaronayres35 704c758
Remove repeated test_segment_plot_map_screen
aaronayres35 095d4dc
Merge branch 'master' into cleanup-mapscreen
aaronayres35 32e2ec6
Remove redundant import
aaronayres35 dd3774c
dont remove copyright header
aaronayres35 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -17,7 +17,7 @@ | |||||||||||||||
from contextlib import contextmanager | ||||||||||||||||
|
||||||||||||||||
# Major library imports | ||||||||||||||||
from numpy import column_stack, transpose | ||||||||||||||||
from numpy import array, column_stack, transpose | ||||||||||||||||
|
||||||||||||||||
# Enthought library imports | ||||||||||||||||
from traits.api import Bool, DelegatesTo, Instance, Float, Property | ||||||||||||||||
|
@@ -126,6 +126,10 @@ def map_screen(self, data_pts): | |||||||||||||||
|
||||||||||||||||
Maps values from data space into screen space. | ||||||||||||||||
""" | ||||||||||||||||
# ensure data_array is an Nx2 ndarray | ||||||||||||||||
data_pts = array(data_pts) | ||||||||||||||||
data_pts = data_pts.reshape(-1, 2) | ||||||||||||||||
Comment on lines
+130
to
+131
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the chaco/chaco/tests/test_grid_mapper.py Lines 36 to 42 in d83e4b8
|
||||||||||||||||
|
||||||||||||||||
xs, ys = transpose(data_pts) | ||||||||||||||||
screen_xs = self._xmapper.map_screen(xs) | ||||||||||||||||
screen_ys = self._ymapper.map_screen(ys) | ||||||||||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
these are actually redundant / unneeded as in the return statement we call
array