@@ -54,8 +54,8 @@ def test_streamset_arrow_values(conn, tmp_collection):
5454 s2 .insert (list (zip (t2 , d2 )))
5555 ss = btrdb .stream .StreamSet ([s1 , s2 ]).filter (start = 100 , end = 121 )
5656 expected_times = [100 , 101 , 105 , 106 , 110 , 114 , 115 , 119 , 120 ]
57- expected_col1 = [0.0 , np .NaN , 1.0 , np .NaN , 2.0 , np .NaN , 3.0 , np .NaN , 4.0 ]
58- expected_col2 = [np .NaN , 5.0 , np .NaN , 6.0 , 7.0 , 8.0 , np .NaN , 9.0 , np .NaN ]
57+ expected_col1 = [0.0 , np .nan , 1.0 , np .nan , 2.0 , np .nan , 3.0 , np .nan , 4.0 ]
58+ expected_col2 = [np .nan , 5.0 , np .nan , 6.0 , 7.0 , 8.0 , np .nan , 9.0 , np .nan ]
5959 expected_schema = pa .schema (
6060 [
6161 pa .field ("time" , pa .timestamp ("ns" , tz = "UTC" ), nullable = False ),
@@ -65,8 +65,8 @@ def test_streamset_arrow_values(conn, tmp_collection):
6565 )
6666 values = ss .arrow_values ()
6767 times = [t .value for t in values ["time" ]]
68- col1 = [np .NaN if isnan (v .as_py ()) else v .as_py () for v in values [str (s1 .uuid )]]
69- col2 = [np .NaN if isnan (v .as_py ()) else v .as_py () for v in values [str (s2 .uuid )]]
68+ col1 = [np .nan if isnan (v .as_py ()) else v .as_py () for v in values [str (s1 .uuid )]]
69+ col2 = [np .nan if isnan (v .as_py ()) else v .as_py () for v in values [str (s2 .uuid )]]
7070 assert times == expected_times
7171 assert col1 == expected_col1
7272 assert col2 == expected_col2
@@ -91,12 +91,12 @@ def test_streamset_template_schema(conn, tmp_collection):
9191 )
9292 ss = btrdb .stream .StreamSet ([s1 , s2 ]).filter (start = 100 , end = 121 , schema = schema )
9393 expected_times = [100 , 101 , 105 , 106 , 110 , 114 , 115 , 119 , 120 ]
94- expected_col1 = [0.0 , np .NaN , 1.0 , np .NaN , 2.0 , np .NaN , 3.0 , np .NaN , 4.0 ]
95- expected_col2 = [np .NaN , 5.0 , np .NaN , 6.0 , 7.0 , 8.0 , np .NaN , 9.0 , np .NaN ]
94+ expected_col1 = [0.0 , np .nan , 1.0 , np .nan , 2.0 , np .nan , 3.0 , np .nan , 4.0 ]
95+ expected_col2 = [np .nan , 5.0 , np .nan , 6.0 , 7.0 , 8.0 , np .nan , 9.0 , np .nan ]
9696 values = ss .arrow_values ()
9797 times = [t .value for t in values ["t" ]]
98- col1 = [np .NaN if isnan (v .as_py ()) else v .as_py () for v in values ["a" ]]
99- col2 = [np .NaN if isnan (v .as_py ()) else v .as_py () for v in values ["b" ]]
98+ col1 = [np .nan if isnan (v .as_py ()) else v .as_py () for v in values ["a" ]]
99+ col2 = [np .nan if isnan (v .as_py ()) else v .as_py () for v in values ["b" ]]
100100 assert times == expected_times
101101 assert col1 == expected_col1
102102 assert col2 == expected_col2
@@ -292,8 +292,8 @@ def test_streamset_to_dataframe(conn, tmp_collection):
292292 ss = btrdb .stream .StreamSet ([s1 , s2 ]).filter (start = 100 , end = 121 )
293293 values = ss .to_dataframe ()
294294 expected_times = [100 , 101 , 105 , 106 , 110 , 114 , 115 , 119 , 120 ]
295- expected_col1 = [0.0 , np .NaN , 1.0 , np .NaN , 2.0 , np .NaN , 3.0 , np .NaN , 4.0 ]
296- expected_col2 = [np .NaN , 5.0 , np .NaN , 6.0 , 7.0 , 8.0 , np .NaN , 9.0 , np .NaN ]
295+ expected_col1 = [0.0 , np .nan , 1.0 , np .nan , 2.0 , np .nan , 3.0 , np .nan , 4.0 ]
296+ expected_col2 = [np .nan , 5.0 , np .nan , 6.0 , 7.0 , 8.0 , np .nan , 9.0 , np .nan ]
297297 expected_dat = {
298298 tmp_collection + "/s1" : expected_col1 ,
299299 tmp_collection + "/s2" : expected_col2 ,
@@ -318,10 +318,10 @@ def test_arrow_streamset_to_dataframe(conn, tmp_collection):
318318 pa .scalar (v , type = pa .timestamp ("ns" , tz = "UTC" )).as_py () for v in expected_times
319319 ]
320320 expected_col1 = pa .array (
321- [0.0 , np .NaN , 1.0 , np .NaN , 2.0 , np .NaN , 3.0 , np .NaN , 4.0 ], mask = [False ] * 9
321+ [0.0 , np .nan , 1.0 , np .nan , 2.0 , np .nan , 3.0 , np .nan , 4.0 ], mask = [False ] * 9
322322 )
323323 expected_col2 = pa .array (
324- [np .NaN , 5.0 , np .NaN , 6.0 , 7.0 , 8.0 , np .NaN , 9.0 , np .NaN ], mask = [False ] * 9
324+ [np .nan , 5.0 , np .nan , 6.0 , 7.0 , 8.0 , np .nan , 9.0 , np .nan ], mask = [False ] * 9
325325 )
326326 expected_dat = {
327327 "time" : expected_times ,
@@ -361,8 +361,8 @@ def test_arrow_streamset_to_polars(conn, tmp_collection):
361361 expected_times = [
362362 pa .scalar (v , type = pa .timestamp ("ns" , tz = "UTC" )).as_py () for v in expected_times
363363 ]
364- expected_col1 = [0.0 , np .NaN , 1.0 , np .NaN , 2.0 , np .NaN , 3.0 , np .NaN , 4.0 ]
365- expected_col2 = [np .NaN , 5.0 , np .NaN , 6.0 , 7.0 , 8.0 , np .NaN , 9.0 , np .NaN ]
364+ expected_col1 = [0.0 , np .nan , 1.0 , np .nan , 2.0 , np .nan , 3.0 , np .nan , 4.0 ]
365+ expected_col2 = [np .nan , 5.0 , np .nan , 6.0 , 7.0 , 8.0 , np .nan , 9.0 , np .nan ]
366366 expected_dat = {
367367 tmp_collection + "/s1" : expected_col1 ,
368368 tmp_collection + "/s2" : expected_col2 ,
@@ -395,8 +395,8 @@ def test_streamset_arrow_polars_vs_old_to_polars(conn, tmp_collection, name_call
395395 expected_times = [
396396 pa .scalar (v , type = pa .timestamp ("ns" , tz = "UTC" )).as_py () for v in expected_times
397397 ]
398- expected_col1 = [0.0 , np .NaN , 1.0 , np .NaN , 2.0 , np .NaN , 3.0 , np .NaN , 4.0 ]
399- expected_col2 = [np .NaN , 5.0 , np .NaN , 6.0 , 7.0 , 8.0 , np .NaN , 9.0 , np .NaN ]
398+ expected_col1 = [0.0 , np .nan , 1.0 , np .nan , 2.0 , np .nan , 3.0 , np .nan , 4.0 ]
399+ expected_col2 = [np .nan , 5.0 , np .nan , 6.0 , 7.0 , 8.0 , np .nan , 9.0 , np .nan ]
400400 expected_dat = {
401401 tmp_collection + "/s1" : expected_col1 ,
402402 tmp_collection + "/s2" : expected_col2 ,
@@ -509,8 +509,8 @@ def test_timesnap_backward_extends_range(conn, tmp_collection):
509509 values = ss .arrow_values ()
510510 assert [1 * sec , 2 * sec ] == [t .value for t in values ["time" ]]
511511 assert [0.5 , 2.0 ] == [v .as_py () for v in values [str (s1 .uuid )]]
512- assert [np .NaN , 2.0 ] == [
513- np .NaN if isnan (v .as_py ()) else v .as_py () for v in values [str (s2 .uuid )]
512+ assert [np .nan , 2.0 ] == [
513+ np .nan if isnan (v .as_py ()) else v .as_py () for v in values [str (s2 .uuid )]
514514 ]
515515 assert [1.0 , 2.0 ] == [v .as_py () for v in values [str (s3 .uuid )]]
516516
0 commit comments