Skip to content

Commit

Permalink
Change test_dataset band dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
hombit committed Nov 6, 2024
1 parent cce604d commit 4f97ce4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/nested_dask/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import nested_dask as nd
import nested_pandas as npd
import numpy as np
import pandas as pd
import pyarrow as pa
import pytest


Expand All @@ -18,7 +20,11 @@ def test_dataset():
layer_data = {
"t": randomstate.random(layer_size * n_base) * 20,
"flux": randomstate.random(layer_size * n_base) * 100,
"band": randomstate.choice(["r", "g"], size=layer_size * n_base),
# Ensure pyarrow[string] dtype, not large_string
# https://github.com/lincc-frameworks/nested-dask/issues/71
"band": pd.Series(
randomstate.choice(["r", "g"], size=layer_size * n_base), dtype=pd.ArrowDtype(pa.string())
),
"index": np.arange(layer_size * n_base) % n_base,
}
layer_nf = npd.NestedFrame(data=layer_data).set_index("index").sort_index()
Expand Down

0 comments on commit 4f97ce4

Please sign in to comment.