Exporting Numpy list from python3 scripting component

Anyone know what to do here? I have a simple python3 scripting component in grasshopper that generates a numpy array and converts to a list. Here’s the code:

#! python 3
# requirements: numpy
import numpy as np
a=1.234*np.ones(10)
a=a.tolist()

All looks OK in a panel component hooked up to the output, but when I try to do any operations (like squaring) on the resulting numbers I get the error: “Invalid Cast: ObjectWrapper >> Primitive Data Type”

If, instead, I were to do this:

#! python 3
# requirements: numpy
import numpy as np
a=1.234*np.ones(10)
a=a.tolist()
a=a[1]

then all works fine on the single number that the script outputs.