Numpy interaction

Hi,

This might seem straight forward but im not too sure. So, I am trying to put a numpy array into a BaseVector, thus far I have been doing so this way:

    temp = un1.vec.CreateVector()
    for j in range (0,len(un1.vec)):
            temp[j] = a[j]

But this is very slow, is there a better way of doing this?

Thanks,
Katie

Hi, yes:

temp.FV().NumPy()[:] = a

Best
Christopher