Closed corranwebster closed 1 year ago
At first glance it looks like something is passing an array (probably with shape (1,1)) instead of a scalar.
Converting warnings to errors gives:
======================================================================
ERROR: test_restrict_to_data_with_empty_source (chaco.tools.tests.test_pan_tool.PanToolTestCase)
----------------------------------------------------------------------
numpy.core._exceptions._UFuncInputCastingError: Cannot cast ufunc 'not_equal' input 1 from dtype('<U4') to dtype('float64') with casting rule 'same_kind'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/cwebster/src/clean/chaco/chaco/tools/tests/test_pan_tool.py", line 41, in test_restrict_to_data_with_empty_source
self.mouse_move(interactor=tool, x=1.0, y=1.0)
File "/Users/cwebster/.edm/envs/chaco-test-3.8-null/lib/python3.8/site-packages/enable/testing.py", line 369, in mouse_move
self._mouse_event_dispatch(interactor, event, "mouse_move")
File "/Users/cwebster/.edm/envs/chaco-test-3.8-null/lib/python3.8/site-packages/enable/testing.py", line 647, in _mouse_event_dispatch
interactor.dispatch(event, suffix)
File "/Users/cwebster/.edm/envs/chaco-test-3.8-null/lib/python3.8/site-packages/enable/base_tool.py", line 137, in dispatch
self._dispatch_stateful_event(event, suffix)
File "/Users/cwebster/.edm/envs/chaco-test-3.8-null/lib/python3.8/site-packages/enable/base_tool.py", line 145, in _dispatch_stateful_event
handler(event)
File "/Users/cwebster/src/clean/chaco/chaco/tools/pan_tool.py", line 235, in panning_mouse_move
mapper.range.set_bounds(newlow, newhigh)
File "/Users/cwebster/src/clean/chaco/chaco/data_range_1d.py", line 166, in set_bounds
result_high = self._do_set_high_setting(high, fire_event=False)
File "/Users/cwebster/src/clean/chaco/chaco/data_range_1d.py", line 293, in _do_set_high_setting
if self._high_setting != val:
FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
Problem Description
Running the test on Python 3.8 with recent NumPy gives warnings like the following:
Reproduction Steps:
Run the tests for Python 3.8 and null toolkit using edmtool, for example.
Expected behavior:
No warnings
OS, Python version: Python 3.8, all OS