[Numpy-discussion] Plans for Numpy 1.4.0 and scipy 0.8.0
Mon Jun 22 06:27:48 CDT 2009
On Mon, Jun 22, 2009 at 3:04 AM, Charles R Harris <email@example.com
> On Mon, Jun 22, 2009 at 12:18 AM, Pierre GM<firstname.lastname@example.org> wrote:
> > On Jun 21, 2009, at 5:01 AM, David Cournapeau wrote:
> >> (Continuing the discussion initiated in the neighborhood iterator
> >> thread)
> >> Hi,
> >> I would like to gather people's opinion on what to target for numpy
> >> 1.4.0.
> > Is this a wish list ?
> > * As Darren mentioned, some __array_prepare__ method called when a
> > ufunc is called on a subclass of ndarray, before any computation takes
> > place. Think of it as a parallel to __array_wrap__
> This is an interesting idea but it need some fleshing out. Working out
> a few example applications would firm things up I think. Things like
> what parameters would be passed need to be specified.
I posted an explanation of what parameters would be passed and a simple
example of how the implementation might look and behave. I gave two
application examples, MaskedArray and Quantities.
> For instance, if
> units are involved there would be a difference between binary and
> unary functions. And what of things like log and exp which should have
> unitless arguments? There looks to be a lot of preliminary work there.
These considerations are already addressed and many of the ufuncs
(arithmetic, inverse, etc) are already implemented in Quantities-0.5b2 (I'll
post a 0.5b3 that implements log and exp this morning at PyPI). The identity
of the ufunc itself is used as the context for operating on the units or
raising an error if the units are incompatible with the operation.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion