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

2010-07-06 Thread David Goldsmith
>>> np.finfo('float64').eps # returns a scalar 2.2204460492503131e-16 >>> np.finfo('float64').epsneg # returns an array array(1.1102230246251565e-16) Bug or feature? DG ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/m

[Numpy-discussion] effect of shape=None (the default) in format.open_memmap

2010-07-06 Thread David Goldsmith
Hi, I'm trying to wrap my brain around the affect of leaving shape=None (the default) in format.open_memmap. First, I get that it's only even seen if the file is opened in write mode. Then, write_array_header_1_0 is called with dict d as second parameter, w/, as near as I can see, d['shape'] stil

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

2010-07-06 Thread David Cournapeau
On Wed, Jul 7, 2010 at 12:34 AM, wrote: > More precisely, the constructor provides C source code to access data > and metadata with files ReadIM{7,x}.{c.h}. > I wrote a tiny ctypes wrappers in order to have a object-oriented > class in python that handling reading the data files written by the >

Re: [Numpy-discussion] reverse cumsum?

2010-07-06 Thread Joshua Holbrook
On Tue, Jul 6, 2010 at 2:23 PM, Alan G Isaac wrote: > On 7/6/2010 3:37 PM, Joshua Holbrook wrote: >> In [10]: np.array(list(reversed(np.arange(10).cumsum( >> Out[10]: array([45, 36, 28, 21, 15, 10,  6,  3,  1,  0]) >> > > > That might appear to match the subject line > but does not match the O

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

2010-07-06 Thread silva
More precisely, the constructor provides C source code to access data and metadata with files ReadIM{7,x}.{c.h}. I wrote a tiny ctypes wrappers in order to have a object-oriented class in python that handling reading the data files written by the constructor software. One issue is that ReadI

Re: [Numpy-discussion] reverse cumsum?

2010-07-06 Thread Alan G Isaac
On 7/6/2010 3:37 PM, Joshua Holbrook wrote: > In [10]: np.array(list(reversed(np.arange(10).cumsum( > Out[10]: array([45, 36, 28, 21, 15, 10, 6, 3, 1, 0]) > That might appear to match the subject line but does not match the OP's example output, which was [45, 45, 44, 42, 39, 35, 30, 24, 1

Re: [Numpy-discussion] reverse cumsum?

2010-07-06 Thread Joshua Holbrook
On Tue, Jul 6, 2010 at 11:25 AM, Jonathan Stickel wrote: > On 7/6/10 10:42 , numpy-discussion-requ...@scipy.org wrote: >> Date: Tue, 06 Jul 2010 10:02:57 -0400 >> From: Alan G Isaac >> Subject: Re: [Numpy-discussion] reverse cumsum? >> To: Discussion of Numerical Python >> Message-ID:<4c333791.501

Re: [Numpy-discussion] reverse cumsum?

2010-07-06 Thread Jonathan Stickel
On 7/6/10 10:42 , numpy-discussion-requ...@scipy.org wrote: > Date: Tue, 06 Jul 2010 10:02:57 -0400 > From: Alan G Isaac > Subject: Re: [Numpy-discussion] reverse cumsum? > To: Discussion of Numerical Python > Message-ID:<4c333791.5010...@american.edu> > Content-Type: text/plain; charset=ISO-8859-1

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

2010-07-06 Thread Lluís
> My opinion on the matter is that, as a matter of "purity," labels > should all have the string datatype. That said, I'd imagine that > passing an int as an argument would be fine, due to python's > loosey-goosey attitude towards datatypes. :) That, or, y'know, > str(myint). That's kind of what I

Re: [Numpy-discussion] numpy on windows 64 bit

2010-07-06 Thread Robin
On Tue, Jul 6, 2010 at 6:57 PM, Christoph Gohlke wrote: > > I proposed a fix at http://projects.scipy.org/numpy/ticket/1535. Does it > work for you? Thanks very much... that looks great. Since it works with long's it fixes my problems (I think it will also fix a couple of the failing scipy tests)

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

2010-07-06 Thread Gael Varoquaux
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 code, but we would be able to rely on it more in our p

Re: [Numpy-discussion] numpy on windows 64 bit

2010-07-06 Thread Christoph Gohlke
On 7/5/2010 4:19 AM, Robin wrote: > On Mon, Jul 5, 2010 at 12:09 PM, David Cournapeau wrote: >> >> Short of saying what those failures are, we can't help you, > > Thanks for reply... Somehow my message got truncated - I had written > more detail about the errors! > >>> I noticed that on windows

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

2010-07-06 Thread Wes McKinney
On Tue, Jul 6, 2010 at 12:56 PM, Keith Goodman wrote: > On Tue, Jul 6, 2010 at 9:52 AM, Joshua Holbrook > wrote: >> On Tue, Jul 6, 2010 at 8:42 AM, Skipper Seabold wrote: >>> On Tue, Jul 6, 2010 at 12:36 PM, Joshua Holbrook >>> wrote: I'm kinda-sorta still getting around to building/readi

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

2010-07-06 Thread Keith Goodman
On Tue, Jul 6, 2010 at 9:52 AM, Joshua Holbrook wrote: > On Tue, Jul 6, 2010 at 8:42 AM, Skipper Seabold wrote: >> On Tue, Jul 6, 2010 at 12:36 PM, Joshua Holbrook >> wrote: >>> I'm kinda-sorta still getting around to building/reading the sphinx >>> docs for datarray. <_< Like, I've gone through

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

2010-07-06 Thread Joshua Holbrook
On Tue, Jul 6, 2010 at 8:42 AM, Skipper Seabold wrote: > On Tue, Jul 6, 2010 at 12:36 PM, Joshua Holbrook > wrote: >> I'm kinda-sorta still getting around to building/reading the sphinx >> docs for datarray. <_< Like, I've gone through them before, but it was >> more cursory than I'd like. Honest

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

2010-07-06 Thread Skipper Seabold
On Tue, Jul 6, 2010 at 12:36 PM, Joshua Holbrook wrote: > I'm kinda-sorta still getting around to building/reading the sphinx > docs for datarray. <_< Like, I've gone through them before, but it was > more cursory than I'd like. Honestly, I kinda let myself get caught up > in trying to automate th

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

2010-07-06 Thread Joshua Holbrook
I'm kinda-sorta still getting around to building/reading the sphinx docs for datarray. <_< Like, I've gone through them before, but it was more cursory than I'd like. Honestly, I kinda let myself get caught up in trying to automate the process of getting them onto github pages. I have to admit tha

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

2010-07-06 Thread Keith Goodman
On Tue, Jul 6, 2010 at 9:13 AM, Skipper Seabold wrote: > On Tue, Jul 6, 2010 at 11:55 AM, Keith Goodman wrote: >> On Tue, Jul 6, 2010 at 7:47 AM, Joshua Holbrook >> wrote: >>> I really really really want to work on this. I already forked datarray >>> on github and did some research on What Othe

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

2010-07-06 Thread Skipper Seabold
On Tue, Jul 6, 2010 at 11:55 AM, Keith Goodman wrote: > On Tue, Jul 6, 2010 at 7:47 AM, Joshua Holbrook > wrote: >> I really really really want to work on this. I already forked datarray >> on github and did some research on What Other People Have Done ( >> http://jesusabdullah.github.com/2010/0

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

2010-07-06 Thread Keith Goodman
On Tue, Jul 6, 2010 at 7:47 AM, Joshua Holbrook wrote: > I really really really want to work on this. I already forked datarray > on github and did some research on What Other People Have Done ( > http://jesusabdullah.github.com/2010/07/02/datarray.html ). With any > luck I'll contribute something

[Numpy-discussion] [ANN] la 0.4, the labeled array

2010-07-06 Thread Keith Goodman
The main class of the la package is a labeled array, larry. A larry consists of data and labels. The data is stored as a NumPy array and the labels as a list of lists (one list per dimension). Alignment by label is automatic when you add (or subtract, multiply, divide) two larrys. The focus of th

[Numpy-discussion] Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread Sturla Molden
Microsoft has withdrawn VS2008 in favor of VS2010. The express version is also unavailable for download. We can still get a VC++ 2008 compiler required to build extensions for the official Python 2.6 and 2.7 binary installers here (Windows 7 SDK for .NET 3.5 SP1): http://www.microsoft.com/down

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

2010-07-06 Thread Skipper Seabold
On Tue, Jul 6, 2010 at 10:47 AM, Joshua Holbrook wrote: > I really really really want to work on this. I already forked datarray > on github and did some research on What Other People Have Done ( > http://jesusabdullah.github.com/2010/07/02/datarray.html ). With any > luck I'll contribute somethin

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

2010-07-06 Thread Joshua Holbrook
I really really really want to work on this. I already forked datarray on github and did some research on What Other People Have Done ( http://jesusabdullah.github.com/2010/07/02/datarray.html ). With any luck I'll contribute something actually useful. :) Anyways! --Josh On Mon, Jul 5, 2010 at 8

Re: [Numpy-discussion] reverse cumsum?

2010-07-06 Thread Alan G Isaac
On 7/6/2010 9:56 AM, Ken Basye wrote: > Is there a simple way to get a cumsum in reverse order? >>> x = np.arange(10) >>> x[::-1].cumsum()[::-1] array([45, 45, 44, 42, 39, 35, 30, 24, 17, 9]) Is that what you want? Alan Isaac ___ NumPy-Discussion mai

[Numpy-discussion] reverse cumsum?

2010-07-06 Thread Ken Basye
Hi, Is there a simple way to get a cumsum in reverse order? So far, the best I've come up with is to use fancy indexing twice to reverse things: >>> x = np.arange(10) >>> np.cumsum(x[np.arange(9, -1, -1)])[np.arange(9, -1, -1)] array([45, 45, 44, 42, 39, 35, 30, 24, 17, 9]) If it matters,

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

2010-07-06 Thread Fabrice Silva
I know it is not directly related to numpy (even if it uses numpy.distutils), but I ask you folks how do you deal with code depending on other libs. In libIM7 projet ( https://launchpad.net/libim7 ), I wrap code from a device constructor with ctypes in order to read Particle Image Velocimetry (PIV

[Numpy-discussion] Yet another axes naming package [Was: Re: BOF notes: Fernando's proposal: NumPy ndarray with named axes]

2010-07-06 Thread Lluís
Jonathan March writes: > Fernando Perez proposed a NumPy enhancement, an ndarray with named axes, > prototyped as DataArray by him, Mike Trumpis, Jonathan Taylor, Matthew > Brett, Kilian Koepsell and Stefan van der Walt. I haven't had a thorough look into it, but this work as well as others liste

Re: [Numpy-discussion] Ternary plots anywhere?

2010-07-06 Thread V. Armando Solé
Hi Ariel, Ariel Rokem wrote: > Hi Armando, > > Here's something in that direction: > > http://nature.berkeley.edu/~chlewis/Sourcecode.html > > > Hope that helps - Ariel > It really helps. It looks more complete than the only thing I had foun

Re: [Numpy-discussion] debian benchmarks

2010-07-06 Thread Francesc Alted
A Monday 05 July 2010 15:32:51 Isaac Gouy escrigué: > Sturla Molden molden.no> writes: > > It is also the kind of tasks where NumPy would help. It would be nice to > > get NumPy into the shootout. At least for the sake of advertising > > http://shootout.alioth.debian.org/u32/program.php?test=spec