xsuite icon indicating copy to clipboard operation
xsuite copied to clipboard

Need to support `+=` when setting with string

Open giadarol opened this issue 1 year ago • 0 comments

UFuncTypeError                            Traceback (most recent call last)
Cell In[2], line 25
     23 line['ks7'] = 0
     24 line['ks8'] = 0
---> 25 line['s7ms01r'].k2 += 'ks7'
     26 line['s8ms01r'].k2 += 'ks8'
     27 sext_knobs = [line['ks8'], line['ks7']] # sextupole knobs to be used for chroma correction

UFuncTypeError: ufunc 'add' did not contain a loop with signature matching types (dtype('float64'), dtype('<U3')) -> None
It also doesn't work, if I assign directly, without adding.

giadarol avatar Oct 26 '24 06:10 giadarol