[Numpy-discussion] GSoC proposal -- Numpy SciPy

Nathaniel Smith njs at pobox.com
Tue Apr 30 15:37:27 EDT 2013


On Tue, Apr 30, 2013 at 3:19 PM, Blake Griffith
<blake.a.griffith at gmail.com> wrote:
> Hello, I'm writing a GSoC proposal, mostly concerning SciPy, but it involves
> a few changes to NumPy.
> The proposal is titled: Improvements to the sparse package of Scipy: support
> for bool dtype and better interaction with NumPy
> and can be found on my GitHub:
> https://github.com/cowlicks/GSoC-proposal/blob/master/proposal.markdown#numpy-interactions----july-8th-to-august-26th-7-weeks
>
> Basically, I want to change the ufunc class to be aware of SciPy's sparse
> matrices. So that when a ufunc is passed a sparse matrix as an argument, it
> will dispatch to a function in the sparse matrix package, which will then
> decide what to do. I just wanted to ping NumPy to make sure this is
> reasonable, and I'm not totally off track. Suggestions, feedback and
> criticism welcome.

How do you plan to go about this? The obvious option of just calling
scipy.sparse.issparse() on ufunc entry raises some problems, since
numpy can't depend on or even import scipy, and we might be reluctant
to add such a special case for what's a rather more general problem.
OTOH it might be possible to solve the problem in general, e.g., see
the prototyped _ufunc_override_ special method in:
  https://github.com/njsmith/numpyNEP/blob/master/numpyNEP.py
but I don't know if you want to get into such a debate within the
scope of your GSoC. What were you thinking?

-n



More information about the NumPy-Discussion mailing list