From: Anton Gladky Date: Sat, 18 Sep 2021 06:10:15 +0000 (+0100) Subject: Fix python numpy warning X-Git-Tag: archive/raspbian/9.0.3+dfsg1-2+rpi1^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5d3f4cc8a118d7f55eb27e07d3bf72305cb8e388;p=vtk9.git Fix python numpy warning Last-Update: 2020-11-09 Gbp-Pq: Name 70_fix_python_numpy_warning.patch --- diff --git a/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py b/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py index 51e2ea7d..2a5e888f 100644 --- a/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py +++ b/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py @@ -206,7 +206,7 @@ def _global_func(impl, array, axis, controller): return dsa.NoneArray; if res is dsa.NoneArray: - if max_dims is 1: + if max_dims == 1: # Weird trick to make the array look like a scalar max_dims = () res = numpy.empty(max_dims)