Re: [Numpy-discussion] Question about dtype

2014-12-12 Thread Nathaniel Smith
On 12 Dec 2014 23:22, "Valentin Haenel" wrote: > > Dear Nathaniel, > > thanks very much for your response. > > * Nathaniel Smith [2014-12-11]: > > On Wed, Dec 10, 2014 at 8:26 PM, Valentin Haenel wrote: > > > I am using numpy version 1.9.0 and Python 2.7.9 and have a question > > > about the dty

Re: [Numpy-discussion] Question about dtype

2014-12-12 Thread Valentin Haenel
Dear Nathaniel, thanks very much for your response. * Nathaniel Smith [2014-12-11]: > On Wed, Dec 10, 2014 at 8:26 PM, Valentin Haenel wrote: > > I am using numpy version 1.9.0 and Python 2.7.9 and have a question > > about the dtype: > > > > In [14]: np.dtype(" > Out[14]: dtype('float64') > >

Re: [Numpy-discussion] Add a function to broadcast arrays to a given shape to numpy's stride_tricks?

2014-12-12 Thread Nathaniel Smith
On 12 Dec 2014 19:29, "Stephan Hoyer" wrote: > > def common_shape(*args): Nitpick: let's call this broadcast_shape, not common_shape; it's as-or-more clear and clearly groups the related functions together. -n ___ NumPy-Discussion mailing list NumPy-Di

Re: [Numpy-discussion] Add a function to broadcast arrays to a given shape to numpy's stride_tricks?

2014-12-12 Thread Jaime Fernández del Río
On Fri, Dec 12, 2014 at 11:28 AM, Stephan Hoyer wrote: > > On Fri, Dec 12, 2014 at 5:48 AM, Jaime Fernández del Río < > jaime.f...@gmail.com> wrote: > >> np.broadcast is the Python object of the old iterator. It may be a better >> idea to write all of these functions using the new one, np.nditer:

Re: [Numpy-discussion] Add a function to broadcast arrays to a given shape to numpy's stride_tricks?

2014-12-12 Thread Stephan Hoyer
On Fri, Dec 12, 2014 at 6:25 AM, Jaime Fernández del Río < jaime.f...@gmail.com> wrote: > it seems that all the functionality that has been discussed are one-liners > using nditer: do we need new functions, or better documentation? > I think there is utility to adding a new function or two (my in

Re: [Numpy-discussion] Add a function to broadcast arrays to a given shape to numpy's stride_tricks?

2014-12-12 Thread Stephan Hoyer
On Fri, Dec 12, 2014 at 5:48 AM, Jaime Fernández del Río < jaime.f...@gmail.com> wrote: > np.broadcast is the Python object of the old iterator. It may be a better > idea to write all of these functions using the new one, np.nditer: > > def common_shape(*args): > return np.nditer(args).shape[:

Re: [Numpy-discussion] Add a function to broadcast arrays to a given shape to numpy's stride_tricks?

2014-12-12 Thread Sebastian Berg
On Fr, 2014-12-12 at 06:25 -0800, Jaime Fernández del Río wrote: > On Fri, Dec 12, 2014 at 5:57 AM, Sebastian Berg > wrote: > On Fr, 2014-12-12 at 05:48 -0800, Jaime Fernández del Río > wrote: > > On Thu, Dec 11, 2014 at 10:53 AM, Stephan Hoyer > > > wrote:

Re: [Numpy-discussion] Add a function to broadcast arrays to a given shape to numpy's stride_tricks?

2014-12-12 Thread Jaime Fernández del Río
On Fri, Dec 12, 2014 at 5:57 AM, Sebastian Berg wrote: > > On Fr, 2014-12-12 at 05:48 -0800, Jaime Fernández del Río wrote: > > On Thu, Dec 11, 2014 at 10:53 AM, Stephan Hoyer > > wrote: > > On Thu, Dec 11, 2014 at 8:17 AM, Sebastian Berg > > wrote: > > One option

Re: [Numpy-discussion] Add a function to broadcast arrays to a given shape to numpy's stride_tricks?

2014-12-12 Thread Sebastian Berg
On Fr, 2014-12-12 at 05:48 -0800, Jaime Fernández del Río wrote: > On Thu, Dec 11, 2014 at 10:53 AM, Stephan Hoyer > wrote: > On Thu, Dec 11, 2014 at 8:17 AM, Sebastian Berg > wrote: > One option > would also be to have something like: >

Re: [Numpy-discussion] Add a function to broadcast arrays to a given shape to numpy's stride_tricks?

2014-12-12 Thread Jaime Fernández del Río
On Thu, Dec 11, 2014 at 10:53 AM, Stephan Hoyer wrote: > > On Thu, Dec 11, 2014 at 8:17 AM, Sebastian Berg < > sebast...@sipsolutions.net> wrote: > >> One option >> would also be to have something like: >> >> np.common_shape(*arrays) >> np.broadcast_to(array, shape) >> # (though I would like many

[Numpy-discussion] ANN: pandas v0.15.2

2014-12-12 Thread Jeff Reback
Hello, We are proud to announce v0.15.2 of pandas, a minor release from 0.15.1. This release includes a small number of API changes, several new features, enhancements, and performance improvements along with a large number of bug fixes. This was a short release of 4 weeks with 137 commits by 49

Re: [Numpy-discussion] Add a function to broadcast arrays to a given shape to numpy's stride_tricks?

2014-12-12 Thread Sebastian Berg
On Do, 2014-12-11 at 16:20 +, Robert Kern wrote: > On Thu, Dec 11, 2014 at 4:17 PM, Sebastian Berg > wrote: > > > > On Do, 2014-12-11 at 16:56 +0100, Pierre Haessig wrote: > > > Le 11/12/2014 16:52, Robert Kern a écrit : > > > > > > > > And we already have a numpy.broadcast() function. > > > >

Re: [Numpy-discussion] Should ndarray be a context manager?

2014-12-12 Thread Sturla Molden
Chris Barker wrote: > Anyway, the point is that if we wanted this to be a > used-more-than-very-rarely in only very special cases feature de-allocating > an array's data buffer), then ndarray would need to grow a check for an > invalid buffer on access. One would probably need something like Jav