Skip to content

Commit 5ec171e

Browse files
alongdmjohnson541
authored andcommitted
Included collFreq in the try block (pdep/network.py)
to capture memory errors generating this array
1 parent 7df6693 commit 5ec171e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

rmgpy/pdep/network.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,8 @@ def calculateCollisionModel(self):
707707
Ngrains = len(self.Elist)
708708
NJ = 1 if self.Jlist is None else len(self.Jlist)
709709

710-
collFreq = numpy.zeros(Nisom, numpy.float64)
711-
712710
try:
711+
collFreq = numpy.zeros(Nisom, numpy.float64)
713712
Mcoll = numpy.zeros((Nisom,Ngrains,NJ,Ngrains,NJ), numpy.float64)
714713
except MemoryError:
715714
logging.warning('Collision matrix too large to manage')

0 commit comments

Comments
 (0)