@@ -256,7 +256,7 @@ describe("expr", () => {
256
256
${ 2 } | ${ 2 }
257
257
` ( "$# fillNan" , ( { replacement, filled } ) => {
258
258
const df = pl . DataFrame ( {
259
- a : [ 1 , NaN , 2 ] ,
259
+ a : [ 1 , Number . NaN , 2 ] ,
260
260
b : [ 2 , 1 , 1 ] ,
261
261
} ) ;
262
262
const expected = pl . DataFrame ( { fillNan : [ 1 , filled , 2 ] } ) ;
@@ -412,13 +412,13 @@ describe("expr", () => {
412
412
expect ( actual ) . toFrameEqual ( expected ) ;
413
413
} ) ;
414
414
test ( "isNan" , ( ) => {
415
- const df = pl . DataFrame ( { a : [ 1 , NaN , 2 ] } ) ;
415
+ const df = pl . DataFrame ( { a : [ 1 , Number . NaN , 2 ] } ) ;
416
416
const expected = pl . DataFrame ( { isNan : [ false , true , false ] } ) ;
417
417
const actual = df . select ( col ( "a" ) . isNan ( ) . as ( "isNan" ) ) ;
418
418
expect ( actual ) . toFrameEqual ( expected ) ;
419
419
} ) ;
420
420
test ( "isNotNan" , ( ) => {
421
- const df = pl . DataFrame ( { a : [ 1 , NaN , 2 ] } ) ;
421
+ const df = pl . DataFrame ( { a : [ 1 , Number . NaN , 2 ] } ) ;
422
422
const expected = pl . DataFrame ( { isNotNan : [ true , false , true ] } ) ;
423
423
const actual = df . select ( col ( "a" ) . isNotNan ( ) . as ( "isNotNan" ) ) ;
424
424
expect ( actual ) . toFrameEqual ( expected ) ;
@@ -1831,18 +1831,19 @@ describe("rolling", () => {
1831
1831
const expected = pl
1832
1832
. Series (
1833
1833
"rolling" ,
1834
- [ null , 0.707107 , 0.707107 , 0.707107 , 0.707107 ] ,
1834
+ [ null , Math . SQRT1_2 , Math . SQRT1_2 , Math . SQRT1_2 , Math . SQRT1_2 ] ,
1835
1835
pl . Float64 ,
1836
1836
)
1837
+ . round ( 10 )
1837
1838
. toFrame ( ) ;
1838
- expect ( df . select ( col ( "rolling" ) . rollingStd ( 2 ) . round ( 6 ) ) ) . toFrameEqual (
1839
+ expect ( df . select ( col ( "rolling" ) . rollingStd ( 2 ) . round ( 10 ) ) ) . toFrameEqual (
1839
1840
expected ,
1840
1841
) ;
1841
1842
expect (
1842
1843
df . select (
1843
1844
col ( "rolling" )
1844
1845
. rollingStd ( { windowSize : 2 , center : true , ddof : 4 } )
1845
- . round ( 6 ) ,
1846
+ . round ( 10 ) ,
1846
1847
) ,
1847
1848
) . toFrameEqual ( expected ) ;
1848
1849
} ) ;
0 commit comments