<div class="gmail_quote">On Wed, Jun 22, 2011 at 5:08 AM, Pauli Virtanen <span dir="ltr"><<a href="mailto:pav@iki.fi">pav@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Tue, 21 Jun 2011 16:43:13 -0500, Mark Wiebe wrote:<br>
[clip: __array_wrap__]<br>
<div class="im">> Those could stay as they are, and just the ufunc usage of __array_wrap__<br>
> can be deprecated. For classes which currently use __array_wrap__, they<br>
> would just need to also implement _numpy_ufunc_ to eliminate any<br>
> deprecation messages.<br>
<br>
</div>Do you mean that the new mechanism would not be able to do<br>
the same thing here?<br></blockquote><div><br></div><div>It would have to be generalized a bit more to support these usages, because some functions produce outputs with different shapes, and the inputs may not be broadcast together in the same manner as in the element-wise ufuncs. </div>
<div>Â </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Preservation of array subclasses in linalg functions is not very<br>
uniform, and will likely need fixes in several of the functions.<br>
Since new code in any case would need to be written, I'd prefer<br>
using the "new" approach and so leaving us the option of marking<br>
the "old" approach deprecated.<br></blockquote><div><br></div><div>I think creating a @ufunc_overload(...) decorator for specifying the ufunc properties like nin and nout might be a nice way to generalize it.</div>
<div><br></div><div>-Mark</div><div>Â </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
    Pauli<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br>