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

Play nicer with ndarray subclasses #2486

Merged
merged 3 commits into from Jun 28, 2017
Merged

Commits on Jun 23, 2017

  1. Add subok kwarg to da.from_array

    Mirrors the `subok` kwarg in `np.array`. If True, array-like's will be
    passed through as chunks unchanged. Default is False. This allows
    avoiding the `np.asarray` call, making it easier to work with non numpy
    arrays as chunks.
    
    To make this work we change `getarray` to a more generic `getter`
    function and add a `subok` parameter. Alternatively we could have kept
    the same format and created more getter functions, but this would have
    led to an explosion of functions for all the different combinations
    (which seemed less maintainable).
    jcrist committed Jun 23, 2017
    Copy the full SHA
    2f381c2 View commit details
    Browse the repository at this point in the history
  2. Add asanyarray

    Similar to `asarray`, but doesn't convert chunks to instances of
    `ndarray`.
    jcrist committed Jun 23, 2017
    Copy the full SHA
    11beae9 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2017

  1. subok -> asarray

    Rename subok kwarg in `from_array` to `asarray`, switch defaults
    accordingly.
    jcrist committed Jun 26, 2017
    Copy the full SHA
    028bae3 View commit details
    Browse the repository at this point in the history