Re: [Numpy-discussion] Best way to expose std::vector to be used with numpy

2014-10-14 Thread John Zwinck
on, maybe you will find the implementation instructive. The functions I described take only a few lines. John Zwinck ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-12 Thread John Zwinck
ly unusual), why force them to always type in the boilerplate independent=True to make it work? John Zwinck ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Request for enhancement to numpy.random.shuffle

2014-10-11 Thread John Zwinck
"independent" has no relevance when the array is 1-d, it can simply be ignored. John Zwinck ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] Round away from zero (towards +/- infinity)

2014-10-02 Thread John Zwinck
On 3 Oct 2014 07:09, "T J" wrote: > > Any bites on this? > > On Wed, Sep 24, 2014 at 12:23 PM, T J wrote: >> Python's round function goes away from zero, so I am looking for the NumPy equivalent (and using vectorize() seems undesirable). In this sense, it seems that having a ufunc for this type o

Re: [Numpy-discussion] Proposal: add ndarray.keys() to return dtype.names

2014-10-02 Thread John Zwinck
On Thu, Oct 2, 2014 at 6:27 PM, Sebastian Wagner wrote: > So, for non-structured arrays, the consens is an Exception. The question > is, which one. > AttributeError would be fully backwards compatible. Existing code checks > for the method and if it exists, the object has fields. > ValueError woul

Re: [Numpy-discussion] Proposal: add ndarray.keys() to return dtype.names

2014-10-01 Thread John Zwinck
On 1 Oct 2014 04:30, "Stephan Hoyer" wrote: > > On Tue, Sep 30, 2014 at 1:22 PM, Eelco Hoogendoorn < hoogendoorn.ee...@gmail.com> wrote: >> >> On more careful reading of your words, I think we agree; indeed, if keys() is present is should return an iterable; but I don't think it should be present

[Numpy-discussion] Proposal: add ndarray.keys() to return dtype.names

2014-09-30 Thread John Zwinck
this is exactly what I'm aiming at. Thoughts? John Zwinck ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion