Skip to content

Commit 758ae06

Browse files
committed
Verbosity, version fix
1 parent afd8367 commit 758ae06

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

src/diffpy/pdfmorph/refine.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,14 @@ def refine(self, *args, **kw):
114114
return 0.0
115115

116116
initial = [config[p] for p in self.pars]
117-
out = leastsq(self.residual, initial, full_output=1)
118-
fvec = out[2]["fvec"]
119-
if out[4] not in (1, 2, 3, 4):
120-
mesg = out[3]
121-
raise ValueError(mesg)
117+
sol, cov_sol, infodict, emesg, ier = leastsq(self.residual, initial, full_output=1)
118+
fvec = infodict["fvec"]
119+
if ier not in (1, 2, 3, 4):
120+
emesg
121+
raise ValueError(emesg)
122122

123123
# Place the fit parameters in config
124-
vals = out[0]
124+
vals = sol
125125
if not hasattr(vals, "__iter__"):
126126
vals = [vals]
127127
self.chain.config.update(zip(self.pars, vals))

src/diffpy/pdfmorph/version.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#
1414
##############################################################################
1515

16-
"""Definition of __version__ and __date__ for diffpy.pdfmorph.
16+
"""Definition of __version__ for diffpy.pdfmorph.
1717
"""
1818

1919

@@ -22,7 +22,4 @@
2222

2323
__version__ = version("diffpy.pdfmorph")
2424

25-
# we assume that tag_date was used and __version__ ends in YYYYMMDD
26-
__date__ = __version__[-8:-4] + "-" + __version__[-4:-2] + "-" + __version__[-2:]
27-
2825
# End of file

0 commit comments

Comments
 (0)