From 822074ba0062880d6fee8826f3400cd1daed2bb6 Mon Sep 17 00:00:00 2001 From: Serge Stinckwich Date: Fri, 24 Jan 2020 22:22:41 +0100 Subject: [PATCH] Fix some of the red tests for Pharo 8 --- src/Math-Accuracy-Core/PMAccuracy.class.st | 4 ++-- .../PMStandardizationScalerTest.class.st | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Math-Accuracy-Core/PMAccuracy.class.st b/src/Math-Accuracy-Core/PMAccuracy.class.st index a841fbf0e..e8fdff98f 100644 --- a/src/Math-Accuracy-Core/PMAccuracy.class.st +++ b/src/Math-Accuracy-Core/PMAccuracy.class.st @@ -19,7 +19,7 @@ Class { #classVars : [ 'DecimalPlaces' ], - #category : 'Math-Accuracy-Core' + #category : #'Math-Accuracy-Core' } { #category : #accessing } @@ -426,7 +426,7 @@ PMAccuracy >> run: anArrayOfNames [ << 'Report for: '; << self class name; cr. - self ifSeveralterations: [ aStream << 'iterations: ' << iterations; cr ]. + self ifSeveralterations: [ aStream << 'iterations: ' << iterations asString; cr ]. (self tree: dataTree removeAll type: self class name data: 'names') at: 'iterations' put: iterations; at: 'names' put: (self tree: KeyedTree new type: 'names' data: a). diff --git a/src/Math-Tests-PrincipalComponentAnalysis/PMStandardizationScalerTest.class.st b/src/Math-Tests-PrincipalComponentAnalysis/PMStandardizationScalerTest.class.st index 03c4a34fa..06e58fad8 100644 --- a/src/Math-Tests-PrincipalComponentAnalysis/PMStandardizationScalerTest.class.st +++ b/src/Math-Tests-PrincipalComponentAnalysis/PMStandardizationScalerTest.class.st @@ -10,7 +10,7 @@ PMStandardizationScalerTest >> testMean [ aMatrix := PMMatrix rows: #((0.0 0.0) #(0.0 0.0) #(1.0 1.0) #(1.0 1.0)). t := PMStandardizationScaler new. t fit: aMatrix. - self assert: t mean asArray closeTo: #(0.5 0.5) + self assert: t mean closeTo: #(0.5 0.5) ] { #category : #tests } @@ -19,7 +19,7 @@ PMStandardizationScalerTest >> testScale [ aMatrix := PMMatrix rows: #((0.0 0.0) #(0.0 0.0) #(1.0 1.0) #(1.0 1.0)). t := PMStandardizationScaler new. t fit: aMatrix. - self assert: t scale asArray closeTo: #(0.5 0.5) + self assert: t scale asPMVector closeTo: #(0.5 0.5) ] { #category : #tests } @@ -54,7 +54,7 @@ PMStandardizationScalerTest >> testVariance [ aMatrix := PMMatrix rows: #((0.0 0.0) #(0.0 0.0) #(1.0 1.0) #(1.0 1.0)). t := PMStandardizationScaler new. t fit: aMatrix. - self assert: t variance asArray closeTo: #(0.25 0.25) + self assert: t variance asPMVector closeTo: #(0.25 0.25) ] { #category : #tests } @@ -66,5 +66,5 @@ PMStandardizationScalerTest >> testZeroScale [ aMatrix := PMMatrix rows: #((8.0 0.0) #(8.0 0.0) #(8.0 1.0) #(8.0 1.0)). t := PMStandardizationScaler new. t fit: aMatrix. - self assert: t scale asArray closeTo: #(1.0 0.5) + self assert: t scale asPMVector closeTo: #(1.0 0.5) ]