Skip to content

Commit a039ebc

Browse files
committed
fix to behave like -= of AI matrix
1 parent 8c9f184 commit a039ebc

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/Math-Matrix/PMMatrix.class.st

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ PMMatrix >> - aMatrix [
198198
PMMatrix >> -= aRow [
199199
"Assume a collection is a matrix of one row"
200200

201-
^ self rowWiseSubstractionWith: aRow
201+
self rowWiseSubstractionWith: aRow
202202
]
203203

204204
{ #category : 'operation' }
@@ -901,14 +901,10 @@ PMMatrix >> rowAt: aRowIndex columnAt: aColumnIndex put: aValue [
901901
PMMatrix >> rowWiseSubstractionWith: aRow [
902902
"Assume a collection is a matrix of one row"
903903

904-
| result |
905-
result := self class rows: self numberOfRows columns: self numberOfColumns.
906-
907904
1 to: self numberOfColumns do: [ :col |
908905
| me |
909906
me := self atColumn: col.
910-
result atColumn: col put: me - (aRow at: col) ].
911-
^ result
907+
self atColumn: col put: me - (aRow at: col) ].
912908
]
913909

914910
{ #category : 'cell accessing' }

0 commit comments

Comments
 (0)