Convert np array to object array to avoid hanging on Mac