That pretty much replicates my original code, except that I didn’t know I could just assign vals to arr by simply recasting them (instead of going through my original loop). 
The reason for posting my question is that this doesn’t work for me. When I run this I get the exception java.lang.IllegalArgumentException: Can not set [F field sketch_18209b$Tmp.radii to java.lang.String.
I don’t understand why I get this exception, and I don’t know how to solve it. 