diff --git a/.github/workflows/run-mayavi-tests.yml b/.github/workflows/run-mayavi-tests.yml index d1667cca7..45fc12d44 100644 --- a/.github/workflows/run-mayavi-tests.yml +++ b/.github/workflows/run-mayavi-tests.yml @@ -13,6 +13,7 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] python-version: ['3.8'] qt-api: ['pyqt5'] + vtk: ['vtk<9.3'] include: - python-version: '3.12' qt-api: 'pyqt6' diff --git a/mayavi/tools/figure.py b/mayavi/tools/figure.py index a89bd9838..a196f1fd9 100644 --- a/mayavi/tools/figure.py +++ b/mayavi/tools/figure.py @@ -69,7 +69,7 @@ def figure(figure=None, bgcolor=None, fgcolor=None, engine=None, engine.new_scene(name=name, size=size) engine.current_scene.name = name else: - if type(figure) in (int, np.int0, np.int8, + if type(figure) in (int, np.intp, np.int8, np.int16, np.int32, np.int64): name = int(figure) __scene_number_list.update((name,)) @@ -165,7 +165,7 @@ def close(scene=None, all=False): if scene is None: scene = engine.current_scene else: - if type(scene) in (int, np.int0, np.int8, + if type(scene) in (int, np.intp, np.int8, np.int16, np.int32, np.int64): scene = int(scene) name = 'Mayavi Scene %d' % scene