Wed Jun 3 10:37:03 CDT 2009
On Jun 3, 2009, at 9:40 AM, firstname.lastname@example.org wrote:
> On Wed, Jun 3, 2009 at 2:17 AM, Pierre GM <email@example.com>
>> On Jun 3, 2009, at 1:09 AM, firstname.lastname@example.org wrote:
>>> Given my experience with views, I would prefer to limit them to very
>>> local usage, e.g. views on transposed arrays don't work,
> there was a thread started by Pauli that inplace operations work on
> the base and not the view.
> I fell over this case and similar cases:
Well noted, but I doubt it's relevant in our simple case ?
> Is there a reason that you prefer view(output_type)
> to __array_wrap__
> which from the help and reading the numpy source seems to be the
> "standard" approach?
I remember running into some troubles with __array_wrap__ (like it not
being called when I expected to, or missing some elements), but
details elude me right now, sorry.
> So, a general decorator looks quite complicated, especially if we want
> to preserve autocomplete (Paulis comment) and not special case all
> different kinds of inputs and outputs, and might need to contain a lot
> of magic.
Well, a catch-all decorator is not the objective, is it? Of course we
need to adapt to particular cases, but are we running into that many
special cases for the descriptive statistics we're working on? I don't
think your example of f_oneway is relevant to the current problem, for
I still think that in many simple cases, such as the ones we're
interested in, a decorator is cleaner.
Now, the issue w/ docstrings is a big one, and requires us to give it
> functools was added in python 2.5
Not a problem w/ recent versions of numpy, where we don't support <2.5
More information about the Scipy-dev