Skip to content

Commit fcbf0cc

Browse files
committed
consider zero dimensional matrix as invalid
1 parent caf9b6d commit fcbf0cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Math-Matrix/PMMatrix.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ PMMatrix >> initializeRows: anArrayOrVector [
514514
{ #category : #initialization }
515515
PMMatrix >> initializeRows: rowsInteger columns: columnsInteger [
516516
"Build empty components for a matrix."
517-
self assert: [ rowsInteger isInteger and: [ rowsInteger >= 0 ] ] description: 'Row size of a matrix must be a positive integer'.
518-
self assert: [ columnsInteger isInteger and: [ columnsInteger >= 0 ] ] description: 'Column size of a matrix must be a positive integer'.
517+
self assert: [ rowsInteger isInteger and: [ rowsInteger > 0 ] ] description: 'Row size of a matrix must be a positive integer'.
518+
self assert: [ columnsInteger isInteger and: [ columnsInteger > 0 ] ] description: 'Column size of a matrix must be a positive integer'.
519519
rows := (1 to: rowsInteger) asPMVector collect: [ :each | PMVector new: columnsInteger ].
520520
]
521521

0 commit comments

Comments
 (0)