From: Anton Gladky Date: Tue, 12 Oct 2021 08:21:32 +0000 (+0100) Subject: Fix python numpy warning X-Git-Tag: archive/raspbian/9.0.3+dfsg1-3+rpi1^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=deb8a167cdcde0609ef6f611a8e02b50c4a877cd;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)