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

2014-10-14 Thread John Zwinck
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
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
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] 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 se...@sebix.at 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.

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

2014-10-02 Thread John Zwinck
On 3 Oct 2014 07:09, T J tjhn...@gmail.com wrote: Any bites on this? On Wed, Sep 24, 2014 at 12:23 PM, T J tjhn...@gmail.com 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

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 sho...@gmail.com 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

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

2014-09-30 Thread John Zwinck
with NumPy arrays, Python dicts, and other types like Pandas DataFrames, h5py Files, and more. It's a fairly common thing to want to get the keys of a container, where keys is understood to be a sequence of values one can pass to __getitem__(), and this is exactly what I'm aiming at. Thoughts? John