3e34371d41f0a1e8ab6df4214c77ace3ca9eac7d,scipy/optimize/least_squares.py,,least_squares,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,148
Before Change
raise ValueError("Method "lm" doesn"t work when the number of "
"residuals is less than the number of variables.")
if jac in ["2-point", "3-point", "cs"] :
if method == "lm":
if jac_sparsity is not None:
raise ValueError("Usage of method="lm" with `jac_sparsity` "
After Change
if callable(jac):
J0 = jac(x0, *args, **kwargs)
if issparse(J0):
J0 = csr_matrix(J0)
def jac_wrapped(x, _=None):
return csr_matrix(jac(x, *args, **kwargs))
elif isinstance(J0, LinearOperator):
def jac_wrapped(x, _=None):
return jac(x, *args, **kwargs)
else:
J0 = np.atleast_2d(J0)
def jac_wrapped(x, _=None):
return np.atleast_2d(jac(x, *args, **kwargs))
if jac_sparsity is not None:
warn("`jac_sparsity = `%s is ignored." % jac_sparsity)
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: scipy/scipy
Commit Name: 3e34371d41f0a1e8ab6df4214c77ace3ca9eac7d
Time: 2015-07-28
Author: evgeni@burovski.me
File Name: scipy/optimize/least_squares.py
Class Name:
Method Name: least_squares
Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: 2e7c0700d00da702cdccb7c19b6fe1857b5bd1b7
Time: 2017-08-24
Author: g.lemaitre58@gmail.com
File Name: imblearn/under_sampling/prototype_generation/cluster_centroids.py
Class Name: ClusterCentroids
Method Name: _sample
Project Name: ClimbsRocks/auto_ml
Commit Name: 66e0021454419913bc4bb04640d7aa784163f4c6
Time: 2017-11-27
Author: climbsbytes@gmail.com
File Name: auto_ml/utils_model_training.py
Class Name: FinalModelATC
Method Name: fit