Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chaco/multi_array_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import warnings

# Major package imports
from numpy import nanmax, nanmin, array, shape, ones, bool, newaxis, nan_to_num
from numpy import nanmax, nanmin, array, shape, ones, newaxis, nan_to_num

# Enthought library imports
from traits.api import Any, Int, Tuple
Expand Down
12 changes: 6 additions & 6 deletions chaco/tools/lasso_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,11 @@ def normal_mouse_down(self, event):
"""
# We may want to generalize this for the n-dimensional case...

self._active_selection = empty((0, 2), dtype=numpy.bool)
self._active_selection = empty((0, 2), dtype=bool)

if self.selection_datasource is not None:
self.selection_datasource.metadata[self.metadata_name] = zeros(
len(self.selection_datasource.get_data()), dtype=numpy.bool
len(self.selection_datasource.get_data()), dtype=bool
)
self.selection_mode = "include"
self.event_state = "selecting"
Expand Down Expand Up @@ -197,7 +197,7 @@ def selecting_mouse_up(self, event):
self._update_selection()

self._previous_selections.append(self._active_selection)
self._active_selection = empty((0, 2), dtype=numpy.bool)
self._active_selection = empty((0, 2), dtype=bool)

def selecting_mouse_move(self, event):
"""Handles the mouse moving when the tool is in the 'selecting' state.
Expand Down Expand Up @@ -246,12 +246,12 @@ def normal_key_pressed(self, event):
# ----------------------------------------------------------------------

def _dataspace_points_default(self):
return empty((0, 2), dtype=numpy.bool)
return empty((0, 2), dtype=bool)

def _reset(self):
"""Resets the selection"""
self.event_state = "normal"
self._active_selection = empty((0, 2), dtype=numpy.bool)
self._active_selection = empty((0, 2), dtype=bool)
self._previous_selections = []
self._update_selection()

Expand Down Expand Up @@ -279,7 +279,7 @@ def _update_selection(self):
return

selected_mask = zeros(
self.selection_datasource._data.shape, dtype=numpy.bool
self.selection_datasource._data.shape, dtype=bool
)
data = self._get_data()

Expand Down