Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new_dd_object's array logic always assumes the metadata is numpy #11017

Open
rjzamora opened this issue Mar 22, 2024 · 0 comments
Open

new_dd_object's array logic always assumes the metadata is numpy #11017

rjzamora opened this issue Mar 22, 2024 · 0 comments

Comments

@rjzamora
Copy link
Member

There is a subtle limitation in the new_dd_object logic used to produce a dask.array.Array collection (important logic is here).

import cudf
import dask.dataframe as dd

s = cudf.Series(range(10))
ds = dd.from_pandas(s, 1)

def func(x):
    return x.values

meta = func(s)
result = ds.map_partitions(func, meta=meta)

assert type(result._meta) == type(meta)  # Fails, because meta is always a numpy array
assert type(result.compute()) == type(meta)  # Passes
@github-actions github-actions bot added the needs triage Needs a response from a contributor label Mar 22, 2024
@phofl phofl added dataframe array and removed needs triage Needs a response from a contributor labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants