Skip to content

Commit c35bd2e

Browse files
fix issue with "None" constraints
1 parent ca8ffdc commit c35bd2e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sample_refinement.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1901,6 +1901,8 @@ def modify_fit(fit, spacegroup, sgoffset = [0,0,0]):
19011901
print(f"Constrained {name} at {old_value}.")
19021902
except:
19031903
pass
1904+
# strip out any constraint whose .par is None
1905+
fit._oconstraints[:] = [c for c in fit._oconstraints if c.par is not None]
19041906
return fit
19051907
#-----------------------------------------------------------------------------
19061908

0 commit comments

Comments
 (0)