Skip to content

Commit

Permalink
fix import and counting to make it work (diffpy#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhua0320 authored Aug 16, 2024
1 parent 6e62077 commit 578a972
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/diffpy/srmise/modelcluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1408,8 +1408,8 @@ def prune(self):
if __name__ == "__main__":
from numpy.random import randn

from diffpy.srmise.modelevaluators import AICc
from diffpy.srmise.peaks import GaussianOverR
from diffpy.srmise.modelevaluators.aicc import AICc
from diffpy.srmise.peaks.gaussianoverr import GaussianOverR

pf = GaussianOverR(0.7)
res = 0.01
Expand Down
2 changes: 1 addition & 1 deletion src/diffpy/srmise/modelparts.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ def npars(self, count_fixed=True):
if count_fixed:
return self._owner.npars
else:
return (self.free is True).sum()
return np.sum(self.free)

def __str__(self):
"""Return string representation of ModelPart parameters."""
Expand Down

0 comments on commit 578a972

Please sign in to comment.