[Numpy-discussion] PR with changes to triangular array functions

Ralf Gommers ralf.gommers at gmail.com
Tue Mar 18 18:36:40 EDT 2014


On Tue, Mar 18, 2014 at 11:21 PM, Jaime Fernández del Río <
jaime.frio at gmail.com> wrote:

> I submitted a PR that makes some improvements to the numpy functions
> dealing with triangular arrays. Aside from a general speed-up of about 2x
> for most functions, there are some minor changes to the public API. In case
> anyone is concerned about them, here's a list:
>

Hi Jaime, I have no concerns but do want to say thank you for the excellent
summaries of your PRs that you send to the lists. Great to keep everyone
who doesn't follow Github activity informed, we should all be doing this
more often!

Cheers,
Ralf



>
> * 'np.tri' now accepts a boolean 'invert' kwarg that is equivalent to '1 -
> np.tri' only faster.
> * 'np.mask_indices' is no longer used by any of the triangular array
> functions. While it is part of the public API, it is not even mentioned in
> the documentation AFAICT. It may be a candidate for deprecation IMO.
> * 'np.tril_indices' and 'np.triu_indices' now accept an 'm' kwarg to
> indicate the number of columns of the array, so they are no longer
> restricted to square arrays. The weird thing is that, to preserve the order
> of the existing arguments, the signature is '(n, k=0, m=None)', while other
> similar functions, such as 'np.tri', have signature '(n, m=None, k=0)'.
> * 'np.triu_indices_from' and 'np.tril_indices_from' now also accept
> rectangular arrays.
>
> The PR can be found here:
> https://github.com/numpy/numpy/pull/4509
>
> Jaime
> --
> (\__/)
> ( O.o)
> ( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes
> de dominación mundial.
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140318/d2d14af3/attachment.html>


More information about the NumPy-Discussion mailing list