Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/diffpy/srfit/fitbase/fitrecipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def addContribution(self, con, weight = 1.0):

def setWeight(self, con, weight):
"""Set the weight of a FitContribution."""
idx = self._contributions.values().index(con)
idx = list(self._contributions.values()).index(con)
self._weights[idx] = weight
return

Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/srfit/fitbase/fitresults.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def formatResults(self, header = "", footer = "", update = False):

## Per-FitContribution results
if len(self.conresults) > 1:
keys = self.conresults.keys()
keys = list(self.conresults.keys())
keys.sort(key=numstr)

lines.append("")
Expand Down
5 changes: 0 additions & 5 deletions src/diffpy/srfit/tests/testpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,6 @@ def test_pickling(self):
self.assertTrue(numpy.array_equal(res1, pc2.residual()))
return

# TODO: remove after fixup release of diffpy.structure
import sys
if sys.version_info >= (3, 7):
test_pickling = unittest.expectedFailure(test_pickling)

# End of class TestPDFContribution

# ----------------------------------------------------------------------------
Expand Down