Skip to content

numpy ufuncs #35

@ev-br

Description

@ev-br

Stephan Hoyer on the ML:

You could actually use a mix of array_prepare and array_wrap to make
(non-generalized) ufuncs work, e.g., for functions like np.sin:

  • In array_prepare, return the non-fill values of the array concatenated
    with the fill value.
  • In array_wrap, reshape all but the last element to build a new sparse
    array, using the last element for the new fill value.

This would be a neat trick and get you most of what you could hope for from
numpy_ufunc.

Looks extremely cool, needs copious testing.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions