Re: [Numpy-discussion] doctest improvements patch (and possible regressions)

2009-12-12 Thread Paul Ivanov
So far, no one has voiced objections, so should I go ahead and check this in? btw, thanks Mike, what about this one: >>> (np.char.lstrip(c, ' ') == np.char.lstrip(c, '')).all() ... # XXX: is this a regression? this line now returns False -pi ... # np.char.lstrip(c,'') does not modify

Re: [Numpy-discussion] Import error in builds of 7726

2009-12-12 Thread Robert Kern
On Sun, Dec 13, 2009 at 00:37, David Cournapeau wrote: > On Sun, Dec 13, 2009 at 4:27 AM, Chris wrote: >> Here is a log form a build of svn rev 7996 with no LDFLAGS specified, as >> recommended by Robert. The result is the same, however. >> >> http://files.me.com/fonnesbeck/y7e9v2 > > I don't see

Re: [Numpy-discussion] Import error in builds of 7726

2009-12-12 Thread David Cournapeau
On Sun, Dec 13, 2009 at 4:27 AM, Chris wrote: > Here is a log form a build of svn rev 7996 with no LDFLAGS specified, as > recommended by Robert. The result is the same, however. > > http://files.me.com/fonnesbeck/y7e9v2 I don't see any build error on this log ? David ___

Re: [Numpy-discussion] Question on timeseries, for financial application

2009-12-12 Thread Robert Ferrell
Have you considered creating a TimeSeries for each data series, and then putting them all together in a dict, keyed by symbol? One disadvantage of one big monster numpy array for all the series is that not all series may have a full set of 1800 data points. So the array isn't really nicely

Re: [Numpy-discussion] Question on timeseries, for financial application

2009-12-12 Thread josef . pktd
On Sat, Dec 12, 2009 at 8:08 PM, THOMAS BROWNE wrote: > Hello all, > > Quite new to numpy / timeseries module, please forgive the elementary > question. > > I wish to do quite to do a bunch of multivariate analysis on 1000 different > financial markets series, each holding about 1800 data points

[Numpy-discussion] Question on timeseries, for financial application

2009-12-12 Thread THOMAS BROWNE
Hello all, Quite new to numpy / timeseries module, please forgive the elementary question. I wish to do quite to do a bunch of multivariate analysis on 1000 different financial markets series, each holding about 1800 data points (5 years of daily data). What's the best way to put this into a

Re: [Numpy-discussion] Import error in builds of 7726

2009-12-12 Thread Chris
Here is a log form a build of svn rev 7996 with no LDFLAGS specified, as recommended by Robert. The result is the same, however. http://files.me.com/fonnesbeck/y7e9v2 cf ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.or

Re: [Numpy-discussion] Repeated dot products

2009-12-12 Thread Anne Archibald
2009/12/12 T J : > Hi, > > Suppose I have an array of shape:  (n, k, k).  In this case, I have n > k-by-k matrices.  My goal is to compute the product of a (potentially > large) user-specified selection (with replacement) of these matrices. > For example, > >   x = [0,1,2,1,3,3,2,1,3,2,1,5,3,2,3,5,

Re: [Numpy-discussion] Repeated dot products

2009-12-12 Thread Denis Laxalde
Le samedi 12 décembre 2009 à 01:55 -0800, T J a écrit : > Is there a better way? You may have a look at http://scipy.org/Cookbook/MultiDot Several alternatives are proposed. Cheers, -- Denis ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Repeated dot products

2009-12-12 Thread josef . pktd
On Sat, Dec 12, 2009 at 4:55 PM, T J wrote: > Hi, > > Suppose I have an array of shape:  (n, k, k).  In this case, I have n > k-by-k matrices.  My goal is to compute the product of a (potentially > large) user-specified selection (with replacement) of these matrices. > For example, > >   x = [0,1,

[Numpy-discussion] Repeated dot products

2009-12-12 Thread T J
Hi, Suppose I have an array of shape: (n, k, k). In this case, I have n k-by-k matrices. My goal is to compute the product of a (potentially large) user-specified selection (with replacement) of these matrices. For example, x = [0,1,2,1,3,3,2,1,3,2,1,5,3,2,3,5,2,5,3,2,1,3,5,6] says that I

Re: [Numpy-discussion] indices of values contained in a list

2009-12-12 Thread Keith Goodman
2009/12/12 Ernest Adrogué : > Hi, > > Suppose I have a flat array, and I want to know the > indices corresponding to values contained in a list > of arbitrary lenght. > > Intuitively I would have done: > > a = np.array([1,2,3,4]) > np.nonzero(a in (0,2,4)) > > However the "in" operator doesn't work

Re: [Numpy-discussion] Slicing slower than matrix multiplication?

2009-12-12 Thread Bruce Southey
On Sat, Dec 12, 2009 at 5:59 AM, Jasper van de Gronde wrote: > Francesc Alted wrote: >> ... >> Yeah, I think taking slices here is taking quite a lot of time: >> >> In [58]: timeit E + Xi2[P/2,:] >> 10 loops, best of 3: 3.95 µs per loop >> >> In [59]: timeit E + Xi2[P/2] >> 10 loops, best

Re: [Numpy-discussion] indices of values contained in a list

2009-12-12 Thread Gary Ruben
np.setmember1d(a,b) does the same as your reduce(np.logical_or, [a == i for i in b]) but it's actually slower on my machine! Gary R. Ernest Adrogué wrote: > Hi, > > Suppose I have a flat array, and I want to know the > indices corresponding to values contained in a list > of arbitrary lenght.

[Numpy-discussion] indices of values contained in a list

2009-12-12 Thread Ernest Adrogué
Hi, Suppose I have a flat array, and I want to know the indices corresponding to values contained in a list of arbitrary lenght. Intuitively I would have done: a = np.array([1,2,3,4]) np.nonzero(a in (0,2,4)) However the "in" operator doesn't work element-wise, instead it compares the whole arr

Re: [Numpy-discussion] Slicing slower than matrix multiplication?

2009-12-12 Thread Jasper van de Gronde
Francesc Alted wrote: > ... > Yeah, I think taking slices here is taking quite a lot of time: > > In [58]: timeit E + Xi2[P/2,:] > 10 loops, best of 3: 3.95 µs per loop > > In [59]: timeit E + Xi2[P/2] > 10 loops, best of 3: 2.17 µs per loop > > don't know why the additional ',:' in the