Issue 1:
If you scale the errors fed into curve_fit, the error returned does not change. This is incorrect behavior. The error (variance and covariance) for a final fit parameter should increase given an increased uncertainty in the actual measured data.

I created a gaussian curve fitting routine. I then show one version functioning as expected, and another version with error increased by a factor of 1e10. The increase in 1e10 should be reflected in the variance/covariance for all fitted parameters. It remains constant:

#!/usr/bin/env python

import numpy as np
import matplotlib.pyplot as plt
import collections as col
import scipy as sp
import scipy.optimize as spopt

plt.close('all')

def _gaussvar(x,amp,mu,variance,bg=0):
return amp*np.exp(-(x-mu)**2/(2*variance))+bg

def iter(factor):
# Generate random numbers with gaussian
# distribution, mu=0, sigma = 3
x=np.random.randn(10000)*3

# Bin the counts
bins = 50
h,edge = np.histogram(x,bins=bins)

# Find the midpoints of the bins
mids = edge + (edge[1]-edge[0])/2
mids = mids[:-1]

# Expected error in counts is sqrt(counts)
sigma = np.sqrt(h)*1

# Error of zero counts isn't zero, but less than one.
# Use 0.5 as a guess.
sigma[sigma==0] = 0.5

# Factor scales error, which should cause
# the pcov matrix to change
sigma = sigma*factor

# Fit the histogram to a gaussian
# popt,pcov,red_chisq = mt.gaussfit(mids,h,sigma_y=sigma,plot=True,variance_bool=True)

# Find initial guesses
y=h
x=mids
amp = max(y)
mu = sum(x*y)/sum(y)
variance = sum(x**2 * y)/sum(y)
bg = 0
p0 = np.array((amp,mu,variance,bg))

# Do actual curve fit
func = _gaussvar
popt,pcov = spopt.curve_fit(func,x,y,sigma=sigma,p0=p0)

output = col.namedtuple('iterout',['popt','pcov'])
out = output(popt,pcov)
return out

num_samples = 1000
variances_regular = np.ones(num_samples)
variances_large = np.ones(num_samples)
means_regular = np.ones(num_samples)
means_large = np.ones(num_samples)
for i in np.linspace(1,num_samples,num_samples)-1:
out = iter(1)
means_regular[i] = out.popt[2]
variances_regular[i] = out.pcov[2,2]

out = iter(1e10)
means_large[i] = out.popt[2]
variances_large[i] = out.pcov[2,2]

plt.hist(variances_regular,bins=20)
plt.hist(variances_large,bins=20)

plt.show()

See also:

https://github.com/joelfrederico/GaussFitDemo

Issue 2:
In the context of #14360 & #15040, we cleaned up a lot of our module API and deprecated those that are supposed to be private, for removal that's scheduled for SciPy 2.0

This was primarily (only?) done for the first-level modules though, not further down the tree. The added test infrastructure contains:

# The PRIVATE_BUT_PRESENT_MODULES list contains modules that look public (lack
# of underscores) but should not be used. For many of those modules the
# current status is fine. For others it may make sense to work on making them
# private, to clean up our public API and avoid confusion.
# These private modules support will be removed in SciPy v2.0.0
PRIVATE_BUT_PRESENT_MODULES = [
...

IMO, without tracking what needs to be done (deprecate and make private, or keep public) and then doing it, we won't be in a position to actually execute this for SciPy 2.0, hence I'm opening this issue. Ideally we decide per module what needs to be done, and then do it, so we can actually remove what we'd like to remove when the time comes.

scipy.constants.codata

scipy.constants.constants

scipy.fftpack.basic

scipy.fftpack.convolve

scipy.fftpack.helper

scipy.fftpack.pseudo_diffs

scipy.fftpack.realtransforms

scipy.integrate.odepack

scipy.integrate.quadpack

scipy.integrate.dop

scipy.integrate.lsoda

scipy.integrate.vode

scipy.interpolate.dfitpack

scipy.interpolate.fitpack

scipy.interpolate.fitpack2

scipy.interpolate.interpnd

scipy.interpolate.interpolate

scipy.interpolate.ndgriddata

scipy.interpolate.polyint

scipy.interpolate.rbf

scipy.io.arff.arffread

scipy.io.harwell_boeing

scipy.io.idl

scipy.io.mmio

scipy.io.netcdf

scipy.io.matlab.byteordercodes

scipy.io.matlab.mio

scipy.io.matlab.mio4

scipy.io.matlab.mio5

scipy.io.matlab.mio5_params

scipy.io.matlab.mio5_utils

scipy.io.matlab.mio_utils

scipy.io.matlab.miobase

scipy.io.matlab.streams

scipy.linalg.basic

scipy.linalg.decomp

scipy.linalg.decomp_cholesky

scipy.linalg.decomp_lu

scipy.linalg.decomp_qr

scipy.linalg.decomp_schur

scipy.linalg.decomp_svd

scipy.linalg.flinalg

scipy.linalg.matfuncs

scipy.linalg.misc

scipy.linalg.special_matrices

scipy.misc.common

scipy.misc.doccer

scipy.ndimage.filters

scipy.ndimage.fourier

scipy.ndimage.interpolation

scipy.ndimage.measurements

scipy.ndimage.morphology

scipy.odr.models

scipy.odr.odrpack

scipy.optimize.cobyla

scipy.optimize.cython_optimize

scipy.optimize.lbfgsb

scipy.optimize.linesearch

scipy.optimize.minpack

scipy.optimize.minpack2

scipy.optimize.moduleTNC

scipy.optimize.nonlin

scipy.optimize.optimize

scipy.optimize.slsqp

scipy.optimize.tnc

scipy.optimize.zeros

scipy.signal.bsplines

scipy.signal.filter_design

scipy.signal.fir_filter_design

scipy.signal.lti_conversion

scipy.signal.ltisys

scipy.signal.signaltools

scipy.signal.spectral

scipy.signal.spline

scipy.signal.waveforms

scipy.signal.wavelets

scipy.signal.windows.windows

scipy.sparse.base

scipy.sparse.bsr

scipy.sparse.compressed

scipy.sparse.construct

scipy.sparse.coo

scipy.sparse.csc

scipy.sparse.csr

scipy.sparse.data

scipy.sparse.dia

scipy.sparse.dok

scipy.sparse.extract

scipy.sparse.lil

scipy.sparse.linalg.dsolve

scipy.sparse.linalg.eigen

scipy.sparse.linalg.interface

scipy.sparse.linalg.isolve

scipy.sparse.linalg.matfuncs

scipy.sparse.sparsetools

scipy.sparse.spfuncs

scipy.sparse.sputils

scipy.spatial.ckdtree

scipy.spatial.kdtree

scipy.spatial.qhull

scipy.spatial.transform.rotation

scipy.special.add_newdocs

scipy.special.basic

scipy.special.cython_special

scipy.special.orthogonal

scipy.special.sf_error

scipy.special.specfun

scipy.special.spfun_stats

scipy.stats.biasedurn

scipy.stats.kde

scipy.stats.morestats

scipy.stats.mstats_basic

scipy.stats.mstats_extras

scipy.stats.mvn

scipy.stats.statlib

scipy.stats.stats