xsuite
xsuite copied to clipboard
Need to support `+=` when setting with string
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.