use np.asarray to convert list sample_weight to array if needed