From 01e0fcf049c25e7e336bac6093caba9e43828869 Mon Sep 17 00:00:00 2001 From: Milan Hauth Date: Fri, 25 Sep 2026 21:48:59 +0200 Subject: [PATCH] fix for numpy 2 fix: ValueError: Both input arrays must be (arrays of) 3-dimensional vectors, but they are 2 and 2 dimensional instead. --- src/selenium_driverless/scripts/geometry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selenium_driverless/scripts/geometry.py b/src/selenium_driverless/scripts/geometry.py index 31033c4..82ae625 100644 --- a/src/selenium_driverless/scripts/geometry.py +++ b/src/selenium_driverless/scripts/geometry.py @@ -164,7 +164,7 @@ def rand_mid_loc(elem: ElemType, spread_a: float = 1, spread_b: float = 1, bias_ a_b = elem[1] - elem[0] b_c = elem[2] - elem[1] # noinspection PyUnreachableCode - area = np.abs(np.cross(a_b, b_c)) + area = np.abs(a_b[0] * b_c[1] - a_b[1] * b_c[0]) if area == 0: raise ValueError("The area of the element is 0")