Skip to content

Commit

Permalink
numpy:Use numpy.iterable instead of deeper function (compatible with …
Browse files Browse the repository at this point in the history
…numpy 2)
  • Loading branch information
smithsp committed Jun 17, 2024
1 parent d59d830 commit ce1e930
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions omas/machine_mappings/d3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit ce1e930

Please sign in to comment.