Skip to content

Commit

Permalink
Fixing test failure for E rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
Bidek56 committed Sep 12, 2024
1 parent f569984 commit 6fe4851
Show file tree
Hide file tree
Showing 3 changed files with 360 additions and 32 deletions.
8 changes: 5 additions & 3 deletions __tests__/expr.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,11 @@ describe("expr", () => {
expect(actual).toFrameEqual(expected);
});
test("exp", () => {
const df = pl.DataFrame({ a: [1.0] });
const actual = df.select(pl.col("a").exp());
const expected = pl.DataFrame({ a: [Math.E] });
const df = pl.DataFrame({ a: [1] });
const actual = df.select(pl.col("a").exp().round(6));
const expected = pl.DataFrame({
a: [Math.round(Math.E * 1_000_000) / 1_000_000],
});
expect(actual).toFrameEqual(expected);
});
test("explode", () => {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@
"@napi-rs/cli": "^2.18.4",
"@types/chance": "^1.1.6",
"@types/jest": "^29.5.12",
"@types/node": "^22.5.3",
"@types/node": "^22.5.4",
"chance": "^1.1.12",
"jest": "^29.7.0",
"source-map-support": "^0.5.21",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typedoc": "^0.26.6",
"typedoc": "^0.26.7",
"typescript": "5.6.2"
},
"packageManager": "[email protected]",
Expand Down
Loading

0 comments on commit 6fe4851

Please sign in to comment.