Skip to content

da.asarray broken for Dask Series / DataFrame #3885

Closed

Description

@TomAugspurger

I suspect as a result of adding .shape / .size in #3212

Looking into a fix now. IIUC, we used to create an intermediate NumPy array here https://github.com/dask/dask/blob/master/dask/array/core.py#L3321-L3322

I don't think we want to return to that behavior.

I've just opened #3884. If we call that, then asarray(dask_frame) will work, but we need to decide what the default behavior should be: perform an intermediate computation to discover the chunk lengths, or allow the chunk lengths to be unknown?

Eagerly computing the lengths is backwards compatible (and more efficient than the old version), but somewhat at odds with the rest of dask. I'm not sure what's best here.

Activity

  1. mrocklin commented on Aug 19, 2018

    @mrocklin
    Member

    I think that it is best to avoid computation if possible. I think that we should produce a dask array with unknown chunk lengths.

  2. TomAugspurger commented on Aug 19, 2018

    @TomAugspurger
    MemberAuthor

    Agreed. Fixing this in #3884

  3. jakirkham commented on Sep 8, 2018

    @jakirkham
    Member

    Closing as it appears this was fixed. Please feel free to reopen if I've misinterpreted this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions