Skip to content

Implemention of np.gradient #2918

Closed
Closed

Description

@mccarthyryanc

I wanted to compute the gradient of a Dask Array, currently on version 0.16 Python3.5, but it doesn't look like it is implemented. Is there a way to compute the gradient, other than simply using numpy.gradient?

Activity

  1. mrocklin commented on Nov 20, 2017

    @mrocklin
    Member

    It looks like numpy.gradient is implemented with just straight numpy syntax. It may be that some large sections of it would just transfer over to dask.arrays with small effort.

  2. jakirkham commented on Nov 21, 2017

    @jakirkham
    Member

    If someone else doesn't do it, I'll probably implement this. Though it likely won't happen right away, but probably before the next release.

    In the interim, would suggest taking a look at dask-ndfilters. It's a little filter library I built on top of Dask and SciPy. It wraps up some common SciPy filters like, gaussian_gradient_magnitude, which may be close to what you want. Also there is generic_filter, which could wrap up something like gradient or just about anything else you can think of. If none of those options cut it, map_overlap is probably sufficient to wrap up NumPy's gradient.

  3. burdickjp commented on Dec 7, 2017

    @burdickjp

    I am also in need of this feature.

  4. jakirkham commented on Dec 7, 2017

    @jakirkham
    Member

    Do you have any thoughts on the approaches outlined above?

  5. mccarthyryanc commented on Jan 16, 2018

    @mccarthyryanc
    Author

    Sorry for the late response, but map_overlap gets me what I needed. @jakirkham, thanks for the feedback!

  6. jakirkham commented on Jan 16, 2018

    @jakirkham
    Member

    No worries. Given you have already had a go at it, @mccarthyryanc, would be happy to review a PR for gradient if you would be interested in submitting one. :)

  7. jakirkham commented on Apr 24, 2018

    @jakirkham
    Member

    Adding an implementation of gradient for Dask Arrays in PR ( #3434 ).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions