Skip to content

PanTool test generates numpy warnings #854

@corranwebster

Description

@corranwebster

Problem Description

Running the test on Python 3.8 with recent NumPy gives warnings like the following:

test_restrict_to_data_with_empty_source (chaco.tools.tests.test_pan_tool.PanToolTestCase) ... /home/runner/.edm/envs/chaco-test-3.8-null/lib/python3.8/site-packages/chaco/data_range_1d.py:293: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._high_setting != val:
/home/runner/.edm/envs/chaco-test-3.8-null/lib/python3.8/site-packages/traits/trait_types.py:4244: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  return trait_type_instance.validate(obj, name, value)
/home/runner/.edm/envs/chaco-test-3.8-null/lib/python3.8/site-packages/chaco/data_range_1d.py:300: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if val == "auto":
/home/runner/.edm/envs/chaco-test-3.8-null/lib/python3.8/site-packages/chaco/data_range_1d.py:307: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  elif val == "track":

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions