Skip to content

Commit

Permalink
avoid masked array vs raw array mismatch in to_dask_array tests
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasdavis committed Jul 12, 2023
1 parent 97c8595 commit 1ab3212
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def test_json_bytes_no_delim_defined(ndjson_points_file: str) -> None:


def test_to_and_from_dask_array(daa: dak.Array) -> None:
daa = dak.from_awkward(daa.compute(), npartitions=3)
computed = ak.flatten(daa.points.x.compute())
x = dak.flatten(daa.points.x)
daskarr = dak.to_dask_array(x)
Expand Down Expand Up @@ -273,6 +274,8 @@ def test_from_lists(caa_p1: ak.Array) -> None:
def test_to_dask_array(daa: dak.Array, caa: dak.Array) -> None:
from dask.array.utils import assert_eq as da_assert_eq

daa = dak.from_awkward(daa.compute(), npartitions=4)

da = dak.to_dask_array(dak.flatten(daa.points.x))
ca = ak.to_numpy(ak.flatten(caa.points.x))
da_assert_eq(da, ca)
Expand Down

0 comments on commit 1ab3212

Please sign in to comment.