From: Anton Gladky Date: Sun, 28 Nov 2021 22:34:47 +0000 (+0000) Subject: Fix python numpy warning X-Git-Tag: archive/raspbian/9.1.0+really9.0.3+dfsg1-4+rpi1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4cb871665de1886efb84ebc839feae52e6b243cb;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)