Skip to content

Commit

Permalink
Merge pull request #543 from williamyao66/master
Browse files Browse the repository at this point in the history
Update dot_simulator.py
  • Loading branch information
Hananel-Hazan committed Mar 23, 2022
2 parents c999225 + f5e9cef commit 177a56a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bindsnet/environment/dot_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,12 @@ def cycleOutFiles(self, newInt=-1):
"""
Increments numbered suffix on output file to start a new one.
"""
oldStr = "_" + str(self.fileCnt)
underScore = self.filename.rfind("_")
if 0 <= newInt:
self.fileCnt = newInt
else:
self.fileCnt += 1
self.filename = self.filename.replace(oldStr, "_" + str(self.fileCnt))
self.filename = self.filename[: underScore + 1] + str(self.fileCnt) + ".csv"

def addFileSuffix(self, suffix):
"""
Expand Down

0 comments on commit 177a56a

Please sign in to comment.