From ce1e9300b37d98b61a1e65e368f315a432bfb406 Mon Sep 17 00:00:00 2001 From: Sterling Smith Date: Mon, 17 Jun 2024 13:14:14 -0700 Subject: [PATCH] numpy:Use numpy.iterable instead of deeper function (compatible with numpy 2) --- omas/machine_mappings/d3d.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/omas/machine_mappings/d3d.py b/omas/machine_mappings/d3d.py index bf3ce439..9ea24718 100644 --- a/omas/machine_mappings/d3d.py +++ b/omas/machine_mappings/d3d.py @@ -2,7 +2,6 @@ import numpy as np from inspect import unwrap -from numpy.lib.function_base import iterable from omas import * from omas.omas_utils import printd, printe, unumpy from omas.machine_mappings._common import * @@ -571,7 +570,7 @@ def ec_launcher_active_hardware(ods, pulse): xfrac = gyrotrons[f'XMFRAC_{system_no}'] - if iterable(xfrac): + if np.iterable(xfrac): beam['mode'] = int(np.round(1.0 - 2.0 * xfrac)[0]) elif type(xfrac) == int or type(xfrac) == float: beam['mode'] = int(np.round(1.0 - 2.0 * xfrac))