Skip to content

Commit 7baf42d

Browse files
committed
wip
1 parent d2a6c9a commit 7baf42d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tmp4.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
from datetime import datetime
2-
31
import geodatasets
42
import geopandas as gpd
53
import numpy as np
64
import quak
75
import sqlglot
8-
from arro3.core import Array, ChunkedArray, DataType, Table
6+
from arro3.core import Array, ChunkedArray, Table
97

108
from lonboard import PolygonLayer, viz
119

@@ -20,16 +18,16 @@ def quak_fn(self: PolygonLayer) -> quak.Widget:
2018
num_rows = table.num_rows
2119
if num_rows <= np.iinfo(np.uint8).max:
2220
row_index = Array.from_numpy(np.arange(num_rows, dtype=np.uint8))
23-
filter_arr = np.zeros(num_rows, dtype=np.uint8)
21+
filter_arr = np.ones(num_rows, dtype=np.uint8)
2422
elif num_rows <= np.iinfo(np.uint16).max:
2523
row_index = Array.from_numpy(np.arange(num_rows, dtype=np.uint16))
26-
filter_arr = np.zeros(num_rows, dtype=np.uint16)
24+
filter_arr = np.ones(num_rows, dtype=np.uint16)
2725
elif num_rows <= np.iinfo(np.uint32).max:
2826
row_index = Array.from_numpy(np.arange(num_rows, dtype=np.uint32))
29-
filter_arr = np.zeros(num_rows, dtype=np.uint32)
27+
filter_arr = np.ones(num_rows, dtype=np.uint32)
3028
else:
3129
row_index = Array.from_numpy(np.arange(num_rows, dtype=np.uint64))
32-
filter_arr = np.zeros(num_rows, dtype=np.uint64)
30+
filter_arr = np.ones(num_rows, dtype=np.uint64)
3331

3432
table_with_row_index = table.append_column("_row_index", ChunkedArray(row_index))
3533
quak_widget = quak.Widget(table_with_row_index)

0 commit comments

Comments
 (0)