Skip to content
Browse files

Merge pull request #120 from cbrueffer/fixes

Add 1 after calling max() instead of adding it to every array element.
  • Loading branch information...
2 parents a928391 + 0cc5574 commit b9e1a02855c8d4c5f41753a3307170b88b75a49a @mdehoon mdehoon committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 Bio/Cluster/__init__.py
View
4 Bio/Cluster/__init__.py
@@ -518,7 +518,7 @@ def save(self, jobname, geneclusters=None, expclusters=None):
elif geneclusters is not None:
# This is a k-means clustering result.
filename = jobname + "_K"
- k = max(geneclusters+1)
+ k = max(geneclusters) + 1
kggfilename = "%s_K_G%d.kgg" % (jobname, k)
geneindex = self._savekmeans(kggfilename, geneclusters, gorder, 0)
postfix = "_G%d" % k
@@ -531,7 +531,7 @@ def save(self, jobname, geneclusters=None, expclusters=None):
elif expclusters is not None:
# This is a k-means clustering result.
filename = jobname + "_K"
- k = max(expclusters+1)
+ k = max(expclusters) + 1
kagfilename = "%s_K_A%d.kag" % (jobname, k)
expindex = self._savekmeans(kagfilename, expclusters, eorder, 1)
postfix += "_A%d" % k

0 comments on commit b9e1a02

Please sign in to comment.
Something went wrong with that request. Please try again.