Fix conversion from numpy.ndarray to list