Skip to content

Commit

Permalink
Allow deltas in units tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdalpino committed Feb 8, 2024
1 parent 77a3504 commit 3bb8eb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/Transformers/MaxAbsoluteScalerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public function fitUpdateTransformReverse() : void

$this->assertCount(3, $sample);

$this->assertEqualsWithDelta(0, $sample[0], 1);
$this->assertEqualsWithDelta(0, $sample[1], 1);
$this->assertEqualsWithDelta(0, $sample[2], 1);
$this->assertEqualsWithDelta(0, $sample[0], 1 + 1e-8);
$this->assertEqualsWithDelta(0, $sample[1], 1 + 1e-8);
$this->assertEqualsWithDelta(0, $sample[2], 1 + 1e-8);

$dataset->reverseApply($this->transformer);

Expand Down
2 changes: 1 addition & 1 deletion tests/Transformers/RobustStandardizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function fitUpdateTransformReverse() : void

$dataset->reverseApply($this->transformer);

$this->assertEquals($original, $dataset->sample(0));
$this->assertEqualsWithDelta($original, $dataset->sample(0), 1e-8);
}

/**
Expand Down

0 comments on commit 3bb8eb3

Please sign in to comment.