ENH: optimize: curve_fit now warns if pcov is undetermined

fixed in 64bdbd9d29dc4e847b1e19f57749e32d38d5ecb