On Thu, Oct 8, 2009 at 11:42 PM, Chris Colbert <sccolbert@gmail.com> wrote:

On Thu, Oct 8, 2009 at 11:38 PM, Damian Eads <eads@soe.ucsc.edu> wrote:
>
> On Thu, Oct 8, 2009 at 2:18 PM, Chris Colbert <sccolbert@gmail.com> wrote:
>>
>> So my next question is: how much hand holding should I do on my end
>> for the user?
>>
>> There are several things I would like to address here:
>>
>> - opencv makes extensive use of *out arguments, should we require the user to
>>  preallocate their out array or should we make it for them and return it.
>>  The latter option is more pythonic, but comes with a small overhead for
>>  determining a proper return dtype
>
> I think having out be None by default is best.
>

That's how i've been going about it so far, but that obviously incurs
an overhead of determining, exactly if and what to return.

Doing it the same as for ufuncs would make sense I think. Is that what you mean by "having out None"? The overhead should be small compared to most operations on images.

Ufuncs return a view on `out` if given by the user. scipy.ndimage returns None in that case. I think returning a view is more convenient.

Cheers,
Ralf