Re: [Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes

2010-07-07 Thread Rob Speer
Glad I finally found this discussion. I implemented some of the ideas from the SciPy BOAF discussion, and Joshua has already merged them into his datarray on GitHub (thanks, Joshua, for being so fast on the merge button). To introduce these changes, here's a couple of examples of how you could in

Re: [Numpy-discussion] TypeError when using double , longdouble in numpy.dot

2010-07-07 Thread Charles R Harris
On Wed, Jul 7, 2010 at 10:13 PM, Christoph Gohlke wrote: > Dear NumPy developers, > > I am trying to solve some scipy.sparse TypeError failures reported in > [1] and reduced them to the following example: > > > >>> import numpy > >>> a = numpy.array([[1]]) > > >>> numpy.dot(a.astype('single'), a.

Re: [Numpy-discussion] TypeError when using double , longdouble in numpy.dot

2010-07-07 Thread Charles R Harris
On Wed, Jul 7, 2010 at 10:13 PM, Christoph Gohlke wrote: > Dear NumPy developers, > > I am trying to solve some scipy.sparse TypeError failures reported in > [1] and reduced them to the following example: > > > >>> import numpy > >>> a = numpy.array([[1]]) > > >>> numpy.dot(a.astype('single'), a.

Re: [Numpy-discussion] TypeError when using double , longdouble in numpy.dot

2010-07-07 Thread David Cournapeau
On Thu, Jul 8, 2010 at 6:13 AM, Christoph Gohlke wrote: > Dear NumPy developers, > > I am trying to solve some scipy.sparse TypeError failures reported in > [1] and reduced them to the following example: > > import numpy a = numpy.array([[1]]) > numpy.dot(a.astype('single'), a.astyp

[Numpy-discussion] TypeError when using double , longdouble in numpy.dot

2010-07-07 Thread Christoph Gohlke
Dear NumPy developers, I am trying to solve some scipy.sparse TypeError failures reported in [1] and reduced them to the following example: >>> import numpy >>> a = numpy.array([[1]]) >>> numpy.dot(a.astype('single'), a.astype('longdouble')) array([[1.0]], dtype=float64) >>> numpy.dot(a.astyp

Re: [Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes

2010-07-07 Thread Fernando Perez
Sorry to be super-brief, I've been offline for days and only have a brief window of access for now. Many thanks to Jonathan for the summary! On Tue, Jul 6, 2010 at 9:42 AM, Skipper Seabold wrote: > > > I think what Josh said is right.  However, we proposed having all of > the new labeled axis ac

[Numpy-discussion] User-defined metadata in dtype

2010-07-07 Thread Lluís
I've been trying to embed extra information into dtype, such that whether I have structured arrays or not, I can alwas have access to: * A name of the field. This is already present on structured arrays, but lost whenever you access a field. * A description of the field. Tried

Re: [Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes

2010-07-07 Thread Lluís
Bruce Southey writes: > 4) How should this interact with the rest of numpy? BTW, now I rememberd something I wanted to implement but required too much monkeypatching right now. For all functions accepting the 'axis' argument, I'd like to provide a string that uniquely identifies a dimension/axis,

Re: [Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes

2010-07-07 Thread Lluís
Bruce Southey writes: > 1) Indexing especially related to slicing and broadcasting. 1.1) Absolute indexing/slicing a[0], a['tickvalue'] 1.2) Partial slicing For the case of "compund" ticks that is merging multiple ticks into a single one: a['subtick1value-subtick2value']

Re: [Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes

2010-07-07 Thread Joshua Holbrook
On Wed, Jul 7, 2010 at 5:52 AM, Bruce Southey wrote: > On 07/06/2010 01:09 PM, Gael Varoquaux wrote: >> Just to give a data point, my research group and I would be very excited >> at the idea of having Fernando's data arrays in Numpy. We can't offer to >> maintain it, because we are already fairly

Re: [Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes

2010-07-07 Thread David Warde-Farley
On 2010-07-07, at 9:52 AM, Bruce Southey wrote: > This is very interesting work especially if can be used to extend or > replace the current record arrays (and perhaps structured arrays). It's unlikely that this would happen. They serve a different purpose, as far as I can tell. It would be pe

Re: [Numpy-discussion] BOF notes: Fernando's proposal: NumPy ndarray with named axes

2010-07-07 Thread Bruce Southey
On 07/06/2010 01:09 PM, Gael Varoquaux wrote: > Just to give a data point, my research group and I would be very excited > at the idea of having Fernando's data arrays in Numpy. We can't offer to > maintain it, because we are already fairly involved in machine learning > and neuroimaging specific c

Re: [Numpy-discussion] OT? Distutils extension with shared libs

2010-07-07 Thread Fabrice Silva
Thanks for your answers. > Three solutions: > - ask your users to build the software and install zlib by > themselves. On windows, I am afraid it means you concretely limit your > userbase to practically 0. > - build zlib as part of the build process, and keep zlib internally. > - include a cop

Re: [Numpy-discussion] finfo.eps v. finfo.epsneg

2010-07-07 Thread Charles R Harris
On Tue, Jul 6, 2010 at 11:33 PM, David Goldsmith wrote: > >>> np.finfo('float64').eps # returns a scalar > 2.2204460492503131e-16 > >>> np.finfo('float64').epsneg # returns an array > array(1.1102230246251565e-16) > > Bug or feature? > > Looks like a bug. Chuck ___