np.asarray(models) has unpredictable behavior so use ndarray at the start