Skip to content

Commit

Permalink
resolved issue #32
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesdaniels committed Jan 18, 2016
1 parent afbd5d1 commit dbf048e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/python33/MatrixUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ def printRange(row1, row2, col1, col2, HERCMATRIX):
raise ValueError("col1 larger than col2")

TMPMATRIX = libHercMatrix.hercMatrix()
TMPMATRIX.height = abs(row2 - row1)
TMPMATRIX.width = abs(col2 - col1)
TMPMATRIX.height = abs(row2 - row1 + 1)
TMPMATRIX.width = abs(col2 - col1 + 1)

width = HERCMATRIX.width
height = HERCMATRIX.height
Expand All @@ -283,8 +283,8 @@ def printRange(row1, row2, col1, col2, HERCMATRIX):
col = element[1]
val = element[2]

if (row >= row1) and (row < row2):
if (col >= col1) and (col < col2):
if (row >= row1) and (row <= row2):
if (col >= col1) and (col <= col2):
try:
TMPMATRIX.setValue(row - row1,
col - col1,
Expand Down

0 comments on commit dbf048e

Please sign in to comment.