Re: [Numpy-discussion] speeding up the following expression

2011-11-12 Thread josef . pktd
On Sat, Nov 12, 2011 at 3:36 AM, Geoffrey Zhu zyzhu2...@gmail.com wrote: Hi, I am playing with multiple ways to speed up the following expression (it is in the inner loop): C[1:(M - 1)]=(a * C[2:] + b * C[1:(M-1)] + c * C[:(M-2)]) where C is an array of about 200-300 elements, M=len(C),

Re: [Numpy-discussion] speeding up the following expression

2011-11-12 Thread josef . pktd
On Sat, Nov 12, 2011 at 10:31 AM, Warren Weckesser warren.weckes...@enthought.com wrote: On Sat, Nov 12, 2011 at 6:43 AM, josef.p...@gmail.com wrote: On Sat, Nov 12, 2011 at 3:36 AM, Geoffrey Zhu zyzhu2...@gmail.com wrote: Hi, I am playing with multiple ways to speed up the following

Re: [Numpy-discussion] speeding up the following expression

2011-11-12 Thread josef . pktd
On Sat, Nov 12, 2011 at 11:32 AM, Warren Weckesser warren.weckes...@enthought.com wrote: On Sat, Nov 12, 2011 at 9:59 AM, josef.p...@gmail.com wrote: On Sat, Nov 12, 2011 at 10:31 AM, Warren Weckesser warren.weckes...@enthought.com wrote: On Sat, Nov 12, 2011 at 6:43 AM,

[Numpy-discussion] bug in reshape ?

2011-11-22 Thread josef . pktd
might be an old story np.__version__ - '1.5.1' It thought for once it's easier to use reshape to add a new axis instead of ...,None but my results got weird (normal(0,1) sample of 2.13795875e-314) x = 1 y = np.arange(3) z = np.arange(2)[:,None] np.broadcast(x,y,z) numpy.broadcast object at

[Numpy-discussion] who owns the data?

2011-11-30 Thread josef . pktd
just a basic question (since I haven't looked at this in some time) I'm creating a structured array in a function. However, I want to return the array with just a simple dtype uni = uni.view(dt).reshape(-1, ncols) return uni the returned uni has owndata=False. Who owns the data, since the

Re: [Numpy-discussion] who owns the data?

2011-11-30 Thread josef . pktd
On Wed, Nov 30, 2011 at 4:00 PM, Robert Kern robert.k...@gmail.com wrote: On Wed, Nov 30, 2011 at 20:30,  josef.p...@gmail.com wrote: just a basic question (since I haven't looked at this in some time) I'm creating a structured array in a function. However, I want to return the array with

Re: [Numpy-discussion] what statistical module to use for python?

2011-11-30 Thread josef . pktd
On Wed, Nov 30, 2011 at 1:16 PM, Chao YUE chaoyue...@gmail.com wrote: Hi all, I just want to broadly ask what statistical package are you guys using? I mean routine statistical function like linear regression, GLM, ANOVA... etc. I know there is SciKits packages like statsmodels, but are

[Numpy-discussion] np.dot and array order

2011-11-30 Thread josef . pktd
np.__version__ '1.5.1' official win32 installer (playing with ipython for once) I thought np.dot is Lapack based and favors fortran order, but if the second array is fortran ordered, then dot takes twice as long. The order of the first array seems irrelevant (or maybe just with my shapes, in

Re: [Numpy-discussion] build numpy matrix out of smaller matrix

2011-12-01 Thread josef . pktd
On Thu, Dec 1, 2011 at 12:26 PM, Benjamin Root ben.r...@ou.edu wrote: On Thu, Dec 1, 2011 at 10:52 AM, jonasr jonas.rueb...@web.de wrote: Hi, is there any possibility to define a numpy matrix, via a smaller given matrix, i.e. in matlab i can do this like a=[1 2 ; 3 4 ] A=[a a ; a a ]

Re: [Numpy-discussion] loop through values in a array and find maximum as looping

2011-12-06 Thread josef . pktd
On Tue, Dec 6, 2011 at 7:55 PM, Olivier Delalleau sh...@keba.be wrote: It may not be the most efficient way to do this, but you can do: mask = b a a[mask] = b[mask] -=- Olivier 2011/12/6 questions anon questions.a...@gmail.com I would like to produce an array with the maximum values out

Re: [Numpy-discussion] loop through values in a array and find maximum as looping

2011-12-06 Thread josef . pktd
On Tue, Dec 6, 2011 at 9:36 PM, Olivier Delalleau sh...@keba.be wrote: The out=a keyword will ensure your first array will keep being updated. So you can do something like: a = my_list_of_arrays[0] for b in my_list_of_arrays[1:]:   numpy.maximum(a, b, out=a) I didn't think of the out

[Numpy-discussion] type checking, what's recommended?

2011-12-07 Thread josef . pktd
If I want to know whether something that might be an array is really a plain ndarray and not a subclass, is using `type` the safest bet? All the other forms don't discriminate against subclasses. type(np.ma.zeros(3)) is np.ndarray False type(np.zeros(3)) is np.ndarray True

Re: [Numpy-discussion] polynomial with negative exponents

2011-12-12 Thread josef . pktd
On Mon, Dec 12, 2011 at 9:04 AM, LASAGNA DAVIDE davide.lasa...@polito.it wrote: Hi, I have written a class for polynomials with negative exponents like: p(x) = a0 + a1*x**-1 + ... + an*x**-n The code is this one: class NegativeExpPolynomial( object ):      def __init__ ( self, coeffs ):

Re: [Numpy-discussion] polynomial with negative exponents

2011-12-12 Thread josef . pktd
On Mon, Dec 12, 2011 at 9:35 AM, josef.p...@gmail.com wrote: On Mon, Dec 12, 2011 at 9:04 AM, LASAGNA DAVIDE davide.lasa...@polito.it wrote: Hi, I have written a class for polynomials with negative exponents like: p(x) = a0 + a1*x**-1 + ... + an*x**-n The code is this one: class

Re: [Numpy-discussion] Would it be possible to enhance np.unique(.) with a keyword kind

2011-12-19 Thread josef . pktd
On Mon, Dec 19, 2011 at 6:27 PM, eat e.antero.ta...@gmail.com wrote: Hi, Especially when the keyword return_index of np.unique(.) is specified to be True, would it in general also be reasonable to be able to specify the sorting algorithm of the underlying np.argsort(.)? The rationale is

Re: [Numpy-discussion] Would it be possible to enhance np.unique(.) with a keyword kind

2011-12-19 Thread josef . pktd
On Mon, Dec 19, 2011 at 8:16 PM, eat e.antero.ta...@gmail.com wrote: Hi, On Tue, Dec 20, 2011 at 2:33 AM, josef.p...@gmail.com wrote: On Mon, Dec 19, 2011 at 6:27 PM, eat e.antero.ta...@gmail.com wrote: Hi, Especially when the keyword return_index of np.unique(.) is specified to be

Re: [Numpy-discussion] Binning

2011-12-22 Thread josef . pktd
On Thu, Dec 22, 2011 at 6:27 AM, Adrien Gaidon adnoth...@gmail.com wrote: Hello Nicola, I am not aware of a magical one function numpy solution (is there one numpy gurus?). I don't know if it's optimal, but here's how I usually do similar things. I wrote a simple function that assigns

Re: [Numpy-discussion] Binning

2011-12-22 Thread josef . pktd
On Thu, Dec 22, 2011 at 11:17 AM, josef.p...@gmail.com wrote: On Thu, Dec 22, 2011 at 6:27 AM, Adrien Gaidon adnoth...@gmail.com wrote: Hello Nicola, I am not aware of a magical one function numpy solution (is there one numpy gurus?). I don't know if it's optimal, but here's how I usually

Re: [Numpy-discussion] Binning

2011-12-22 Thread josef . pktd
On Thu, Dec 22, 2011 at 11:39 AM, Adrien adnoth...@gmail.com wrote: Le 22/12/2011 17:17, josef.p...@gmail.com a écrit : On Thu, Dec 22, 2011 at 6:27 AM, Adrien Gaidonadnoth...@gmail.com  wrote: Hello Nicola, I am not aware of a magical one function numpy solution (is there one numpy gurus?).

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-26 Thread josef . pktd
On Mon, Dec 26, 2011 at 1:51 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: 2011/12/25 Jordi Gutiérrez Hermoso jord...@octave.org I have been instructed to bring this issue to the mailing list:   http://projects.scipy.org/numpy/ticket/1994 The issue is this corner case: idx = [] x

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-26 Thread josef . pktd
2011/12/26 Jordi Gutiérrez Hermoso jord...@octave.org: On 26 December 2011 14:56, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Mon, Dec 26, 2011 at 8:50 PM, josef.p...@gmail.com wrote: I have a hard time thinking through empty 2-dim arrays, and don't know what rules should apply.

Re: [Numpy-discussion] polynomial package update

2012-01-02 Thread josef . pktd
On Mon, Jan 2, 2012 at 9:44 PM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, I've made a pull request for a  rather large update of the polynomial package. The new features are 1) Bug fixes 2) Improved documentation in the numpy reference 3) Preliminary support for

Re: [Numpy-discussion] np.zeros(2, 'S') returns empty strings.

2012-01-14 Thread josef . pktd
On Sat, Jan 14, 2012 at 5:25 PM, Benjamin Root ben.r...@ou.edu wrote: On Sat, Jan 14, 2012 at 4:16 PM, Benjamin Root ben.r...@ou.edu wrote: On Sat, Jan 14, 2012 at 4:12 PM, Charles R Harris charlesr.har...@gmail.com wrote: This sort of makes sense, but is it the 'correct' behavior? In

Re: [Numpy-discussion] np.zeros(2, 'S') returns empty strings.

2012-01-15 Thread josef . pktd
On Sun, Jan 15, 2012 at 3:15 AM, Nathaniel Smith n...@pobox.com wrote: On Sat, Jan 14, 2012 at 2:12 PM, Charles R Harris charlesr.har...@gmail.com wrote: This sort of makes sense, but is it the 'correct' behavior? In [20]: zeros(2, 'S') Out[20]: array(['', ''],   dtype='|S1') I think

Re: [Numpy-discussion] Cross-covariance function

2012-01-21 Thread josef . pktd
On Sat, Jan 21, 2012 at 6:26 PM, John Salvatier jsalv...@u.washington.edu wrote: I ran into this a while ago and was confused why cov did not behave the way pierre suggested. same here, When I rewrote scipy.stats.spearmanr, I matched the numpy behavior for two arrays, while R only returns the

Re: [Numpy-discussion] bug in numpy.mean() ?

2012-01-24 Thread josef . pktd
On Tue, Jan 24, 2012 at 7:21 PM, eat e.antero.ta...@gmail.com wrote: Hi On Wed, Jan 25, 2012 at 1:21 AM, Kathleen M Tacina kathleen.m.tac...@nasa.gov wrote: ** I found something similar, with a very simple example. On 64-bit linux, python 2.7.2, numpy development version: In [22]: a =

Re: [Numpy-discussion] bug in numpy.mean() ?

2012-01-24 Thread josef . pktd
On Wed, Jan 25, 2012 at 12:03 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Jan 24, 2012 at 4:21 PM, Kathleen M Tacina kathleen.m.tac...@nasa.gov wrote: I found something similar, with a very simple example. On 64-bit linux, python 2.7.2, numpy development version: In

Re: [Numpy-discussion] view of a structured array?

2012-01-25 Thread josef . pktd
On Wed, Jan 25, 2012 at 2:27 PM, Chris Barker chris.bar...@noaa.gov wrote: HI folks, Is there a way to get a view of a subset of a structured array? I know that an arbitrary subset will not fit into the numpy stridesoffsets model, but some will, and it would be nice to have a view: For

Re: [Numpy-discussion] Cross-covariance function

2012-01-26 Thread josef . pktd
On Thu, Jan 26, 2012 at 12:26 PM, Sturla Molden stu...@molden.no wrote: Den 26.01.2012 17:25, skrev Pierre Haessig: However, in the case this change is not possible, I would see this solution : * add and xcov function that does what Elliot and Sturla and I described, because The current

Re: [Numpy-discussion] Cross-covariance function

2012-01-26 Thread josef . pktd
On Thu, Jan 26, 2012 at 3:58 PM, Bruce Southey bsout...@gmail.com wrote: On Thu, Jan 26, 2012 at 12:45 PM,  josef.p...@gmail.com wrote: On Thu, Jan 26, 2012 at 1:25 PM, Bruce Southey bsout...@gmail.com wrote: On Thu, Jan 26, 2012 at 10:07 AM, Pierre Haessig pierre.haes...@crans.org wrote: Le

Re: [Numpy-discussion] numpy all unexpected result (generator)

2012-01-31 Thread josef . pktd
On Tue, Jan 31, 2012 at 5:35 PM, Travis Oliphant tra...@continuum.io wrote: Actually i believe the NumPy 'any' and 'all' names pre-date the Python usage which first appeared in Python 2.5 I agree with Chris that namespaces are a great idea.  I don't agree with deprecating 'any' and 'all' I

Re: [Numpy-discussion] autocorrelation computation performance : use of np.correlate

2012-02-01 Thread josef . pktd
On Wed, Feb 1, 2012 at 6:48 PM, Benjamin Root ben.r...@ou.edu wrote: On Wednesday, February 1, 2012, Pierre Haessig pierre.haes...@crans.org wrote: Hi, [I'm not sure whether this discussion belongs to numpy-discussion or scipy-dev] In day to day time series analysis I regularly need to

Re: [Numpy-discussion] Trick for fast

2012-02-03 Thread josef . pktd
On Fri, Feb 3, 2012 at 8:44 AM, Alan G Isaac alan.is...@gmail.com wrote: On 2/3/2012 5:16 AM, santhu kumar wrote: x = nX3 vector. mass = nX1 vector inert = zeros((3,3)) for i in range(n):        ri = x[i,:].reshape(1,3)        inert = inert + mass[i,]*(sum(ri*ri)*eye(3) - dot(ri.T,ri))

Re: [Numpy-discussion] Trick for fast

2012-02-03 Thread josef . pktd
On Fri, Feb 3, 2012 at 1:29 PM, santhu kumar mesan...@gmail.com wrote: Hello all, Thanks for lovely solutions. I have sat on it for some time and wrote it myself : n =x.shape[0] ea = np.array([1,0,0,0,1,0,0,0,1]) inert = ((np.tile(ea,(n,1))*((x*x).sum(axis=1)[:,np.newaxis]) -

Re: [Numpy-discussion] Trick for fast

2012-02-03 Thread josef . pktd
On Fri, Feb 3, 2012 at 1:58 PM, santhu kumar mesan...@gmail.com wrote: Hi Josef, I am unclear on what you want to say, but all I am doing in the code is getting inertia tensor for a bunch of particle masses. (http://en.wikipedia.org/wiki/Moment_of_inertia#Moment_of_inertia_tensor) So the

Re: [Numpy-discussion] Trick for fast

2012-02-03 Thread josef . pktd
On Fri, Feb 3, 2012 at 2:33 PM, josef.p...@gmail.com wrote: On Fri, Feb 3, 2012 at 1:58 PM, santhu kumar mesan...@gmail.com wrote: Hi Josef, I am unclear on what you want to say, but all I am doing in the code is getting inertia tensor for a bunch of particle masses.

Re: [Numpy-discussion] Trick for fast

2012-02-03 Thread josef . pktd
On Fri, Feb 3, 2012 at 4:49 PM, Alan G Isaac alan.is...@gmail.com wrote: On 2/3/2012 3:37 PM, josef.p...@gmail.com wrote: res = - np.dot(x.T, mass*x) res[np.arange(3), np.arange(3)] -= np.trace(res) Nice! Get some speed gain with slicing: res = - np.dot(x.T, mass*x)

Re: [Numpy-discussion] ValueError: total size of new array must be unchanged only on Windows

2012-02-05 Thread josef . pktd
On Sun, Feb 5, 2012 at 12:39 PM, Paolo p.zaff...@yahoo.it wrote: This is my code: matrix=.join(f.readlines()) my guess would be, that you have to strip the line endings \n versus \r\n Josef matrix=np.fromstring(matrix, dtype=np.int16) matrix=matrix.reshape(siz[2],siz[1],siz[0]).T

Re: [Numpy-discussion] ValueError: total size of new array must be unchanged only on Windows

2012-02-05 Thread josef . pktd
On Sun, Feb 5, 2012 at 12:52 PM, Paolo p.zaff...@yahoo.it wrote: How I can do this? I'm not sure without trying, numpy.loadtxt might be the easier choice matrix=.join((i.strip() for i in f.readlines())) I think strip() also removes newlines besides other whitespace otherwise more

Re: [Numpy-discussion] Logical indexing and higher-dimensional arrays.

2012-02-08 Thread josef . pktd
On Wed, Feb 8, 2012 at 10:29 AM, Sturla Molden stu...@molden.no wrote: On 08.02.2012 15:49, Travis Oliphant wrote: This sort of thing would take time, but is not out of the question in my mind because I suspect the number of users and use-cases of broadcasted fancy-indexing is small. I

Re: [Numpy-discussion] cumsum much slower than simple loop?

2012-02-09 Thread josef . pktd
On Thu, Feb 9, 2012 at 11:39 PM, Dave Cook dav...@gmail.com wrote: Why is numpy.cumsum (along axis=0) so much slower than a simple loop?  The same goes for numpy.add.accumulate # cumsumtest.py import numpy as np def loopcumsum(a):     csum = np.empty_like(a)     s = 0.0     for i in

Re: [Numpy-discussion] Numpy governance update

2012-02-15 Thread josef . pktd
On Wed, Feb 15, 2012 at 4:43 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Wed, Feb 15, 2012 at 12:45 PM, Alan G Isaac alan.is...@gmail.com wrote: My analysis is fundamentally different than Matthew and Benjamin's for a few reasons. 1. The problem has been miscast.    The

Re: [Numpy-discussion] Numpy governance update

2012-02-15 Thread josef . pktd
On Wed, Feb 15, 2012 at 7:27 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 02/15/2012 02:24 PM, Mark Wiebe wrote: On Wed, Feb 15, 2012 at 1:36 PM, Matthew Brett matthew.br...@gmail.com mailto:matthew.br...@gmail.com wrote:     Hi,     On Wed, Feb 15, 2012 at 12:55 PM, Mark

Re: [Numpy-discussion] Numpy governance update

2012-02-15 Thread josef . pktd
On Wed, Feb 15, 2012 at 8:49 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Wed, Feb 15, 2012 at 4:27 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 02/15/2012 02:24 PM, Mark Wiebe wrote: There certainly is governance now, it's just informal. It's a combination of

Re: [Numpy-discussion] Numpy governance update

2012-02-15 Thread josef . pktd
On Wed, Feb 15, 2012 at 9:12 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Wed, Feb 15, 2012 at 6:07 PM,  josef.p...@gmail.com wrote: On Wed, Feb 15, 2012 at 8:49 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Wed, Feb 15, 2012 at 4:27 PM, Dag Sverre Seljebotn

[Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-15 Thread josef . pktd
Doing a bit of browsing in the numpy tracker, I found this. From my search this was not discussed on the mailing list. http://projects.scipy.org/numpy/ticket/1842 The multivariate normal random sample is not always the same, even though a seed is specified. It seems to alternate randomly

Re: [Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-15 Thread josef . pktd
On Wed, Feb 15, 2012 at 10:52 PM, josef.p...@gmail.com wrote: Doing a bit of browsing in the numpy tracker, I found this. From my search this was not discussed on the mailing list. http://projects.scipy.org/numpy/ticket/1842 The multivariate normal random sample is not always the same, even

Re: [Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-16 Thread josef . pktd
On Thu, Feb 16, 2012 at 4:44 AM, Pauli Virtanen p...@iki.fi wrote: Hi, 16.02.2012 06:09, josef.p...@gmail.com kirjoitti: [clip] numpy linalg.svd doesn't produce always the same results running this gives two different answers, using scipy.linalg.svd I always get the same answer, which is

Re: [Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-16 Thread josef . pktd
On Thu, Feb 16, 2012 at 8:45 AM, Pauli Virtanen p...@iki.fi wrote: 16.02.2012 14:14, josef.p...@gmail.com kirjoitti: [clip] We had other cases of several patterns in quasi-deterministic linalg before, but as far as I remember only in the final digits of precision, where it didn't matter much

Re: [Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-16 Thread josef . pktd
On Thu, Feb 16, 2012 at 9:08 AM, Pauli Virtanen p...@iki.fi wrote: 16.02.2012 14:54, josef.p...@gmail.com kirjoitti: [clip] If I interpret you correctly, this should be a svd ticket, or an svd ticket as duplicate ? I think it should be a multivariate normal ticket. Fixing SVD is in my

Re: [Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-16 Thread josef . pktd
On Thu, Feb 16, 2012 at 11:20 AM, Warren Weckesser warren.weckes...@enthought.com wrote: On Thu, Feb 16, 2012 at 10:12 AM, Pierre Haessig pierre.haes...@crans.org wrote: Le 16/02/2012 16:20, josef.p...@gmail.com a écrit : I don't see any way to fix multivariate_normal for this case, except

Re: [Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-16 Thread josef . pktd
On Thu, Feb 16, 2012 at 11:30 AM, josef.p...@gmail.com wrote: On Thu, Feb 16, 2012 at 11:20 AM, Warren Weckesser warren.weckes...@enthought.com wrote: On Thu, Feb 16, 2012 at 10:12 AM, Pierre Haessig pierre.haes...@crans.org wrote: Le 16/02/2012 16:20, josef.p...@gmail.com a écrit : I

Re: [Numpy-discussion] strange behavior of numpy.random.multivariate_normal, ticket:1842

2012-02-16 Thread josef . pktd
On Thu, Feb 16, 2012 at 11:47 AM, josef.p...@gmail.com wrote: On Thu, Feb 16, 2012 at 11:30 AM,  josef.p...@gmail.com wrote: On Thu, Feb 16, 2012 at 11:20 AM, Warren Weckesser warren.weckes...@enthought.com wrote: On Thu, Feb 16, 2012 at 10:12 AM, Pierre Haessig pierre.haes...@crans.org

Re: [Numpy-discussion] Numpy governance update

2012-02-16 Thread josef . pktd
On Thu, Feb 16, 2012 at 12:53 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Feb 16, 2012 at 9:56 AM, Nathaniel Smith n...@pobox.com wrote: On Thu, Feb 16, 2012 at 12:27 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: If non-contributing users came along on the

Re: [Numpy-discussion] Numpy governance update

2012-02-16 Thread josef . pktd
On Fri, Feb 17, 2012 at 12:54 AM, Benjamin Root ben.r...@ou.edu wrote: On Thursday, February 16, 2012, John Hunter wrote: On Thu, Feb 16, 2012 at 7:26 PM, Alan G Isaac alan.is...@gmail.com wrote: On 2/16/2012 7:22 PM, Matthew Brett wrote: This has not been an encouraging episode in

Re: [Numpy-discussion] Proposed Roadmap Overview

2012-02-17 Thread josef . pktd
On Fri, Feb 17, 2012 at 9:29 PM, David Cournapeau courn...@gmail.com wrote: Le 18 févr. 2012 00:58, Charles R Harris charlesr.har...@gmail.com a écrit : On Fri, Feb 17, 2012 at 4:44 PM, David Cournapeau courn...@gmail.com wrote: I don't think c++ has any significant advantage over c

[Numpy-discussion] The end of numpy as we know it ?

2012-02-18 Thread josef . pktd
(on a ambiguous day, pessimistic or optimistic?) Numpy is a monster written by a bunch of amateurs (engineers and scientists), with a glacial pace of development. If we want to make any progress to the world dominance of python in science, we need to go professionally about it. First we need to

Re: [Numpy-discussion] The end of numpy as we know it ?

2012-02-18 Thread josef . pktd
On Sat, Feb 18, 2012 at 2:14 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Feb 18, 2012 at 9:06 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 02/18/2012 08:52 AM, Benjamin Root wrote: On Saturday, February 18, 2012, Sturla Molden wrote:     Den 18. feb.

[Numpy-discussion] log relative error

2012-02-26 Thread josef . pktd
(I got distracted by some numerical accuracy checks. np.polyfit looks good in NIST test.) Does numpy have something like this? def lre(actual, desired): '''calculate log relative error, number of correct significant digits not an informative function name Parameters --

Re: [Numpy-discussion] Numpy fitting

2012-03-01 Thread josef . pktd
On Thu, Mar 1, 2012 at 10:39 AM, Olivier Delalleau sh...@keba.be wrote: Sorry I can't help, but I'd just suggest to post this on the scipy mailing list as you may get more replies there. -=- Olivier Le 1 mars 2012 10:24, Pierre Barthelemy bart...@gmail.com a écrit : Dear all, i am

Re: [Numpy-discussion] Jaccard Hamming Problem

2012-03-01 Thread josef . pktd
On Thu, Mar 1, 2012 at 10:10 AM, Zayd YAKOUBI zayd.yako...@gmail.com wrote: thank you very much, In fact, the functions of these two measures are  for binary vectors, and I have not found their extension to real data such as: 0.7, 0.9, 1.7 Knowing that I applied to this data and it worked

Re: [Numpy-discussion] verbose output when running python script?

2012-03-05 Thread josef . pktd
On Mon, Mar 5, 2012 at 10:27 AM, Chao YUE chaoyue...@gmail.com wrote: Dear all, Sorry this is not the good place to ask but I think there must be someone who has done this before. Is there any way to see the execution of python script line by line as the verbose model of shell script? this

Re: [Numpy-discussion] all elements equal

2012-03-05 Thread josef . pktd
On Mon, Mar 5, 2012 at 2:33 PM, Olivier Delalleau sh...@keba.be wrote: Le 5 mars 2012 14:29, Keith Goodman kwgood...@gmail.com a écrit : On Mon, Mar 5, 2012 at 11:24 AM, Neal Becker ndbeck...@gmail.com wrote: Keith Goodman wrote: On Mon, Mar 5, 2012 at 11:14 AM, Neal Becker

Re: [Numpy-discussion] Github key audit.

2012-03-07 Thread josef . pktd
On Wed, Mar 7, 2012 at 1:54 PM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, Many here have probably received the message from github about push/pull access being blocked until you have auditied your ssh keys. To generate a key fingerprint on fedora, I did the following:

Re: [Numpy-discussion] float96 on windows32 is float64?

2012-03-16 Thread josef . pktd
On Fri, Mar 16, 2012 at 2:10 AM, Ilan Schnell ischn...@enthought.com wrote: I just did a quick test across all supported EPD platforms: win-64: float96 No, float128 No win-32: float96 No, float128 No osx-64: float96 No, float128 Yes osx-32: float96 No, float128 Yes rh3-64: float96 No,

[Numpy-discussion] GSoC 2012

2012-03-25 Thread josef . pktd
What happened to any plans for GSOC? http://wiki.python.org/moin/SummerOfCode/2012 Josef ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

Re: [Numpy-discussion] different percentile implementations ?

2012-03-27 Thread josef . pktd
On Sun, Mar 25, 2012 at 6:30 PM, Pierre Haessig pierre.haes...@crans.org wrote: Hi, A quick question I've had in mind for some time but didn't find a solution : Is there a significant difference between numpy.percentile and scipy.stats.scoreatpercentile ? Of course the signatures are

Re: [Numpy-discussion] different percentile implementations ?

2012-03-28 Thread josef . pktd
On Wed, Mar 28, 2012 at 5:44 AM, Pierre Haessig pierre.haes...@crans.org wrote: Le 27/03/2012 18:56, josef.p...@gmail.com a écrit : similar to std, var, histogram, ... some functions from scipy.stats are now in numpy. Ok, historical reasons then. Fair enough. Would a See also:

Re: [Numpy-discussion] weird searchsorted behavior for unicode array

2012-03-28 Thread josef . pktd
On Wed, Mar 28, 2012 at 10:55 AM, Thouis (Ray) Jones tho...@gmail.com wrote: I am seeing some very strange behavior searching a unicode array.  The attached code outputs the following: UNICODE Is sorted: True Search sorted by iteration, left: [0, 1, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 13]

Re: [Numpy-discussion] weird searchsorted behavior for unicode array

2012-03-28 Thread josef . pktd
On Wed, Mar 28, 2012 at 11:51 AM, josef.p...@gmail.com wrote: On Wed, Mar 28, 2012 at 10:55 AM, Thouis (Ray) Jones tho...@gmail.com wrote: I am seeing some very strange behavior searching a unicode array.  The attached code outputs the following: UNICODE Is sorted: True Search sorted by

Re: [Numpy-discussion] One question about the numpy.linalg.eig() routine

2012-04-02 Thread josef . pktd
2012/4/2 Hongbin Zhang hongbin_zhan...@hotmail.com: Dear Python-users, I am currently very confused about the Scipy routine to obtain the eigenvectors of a complex matrix. In attached you find two files to diagonalize a 2X2 complex Hermitian matrix, however, on my computer, If I run

Re: [Numpy-discussion] documentation bug: Matrix library page not populated

2012-04-18 Thread josef . pktd
On Wed, Apr 18, 2012 at 4:14 PM, Pauli Virtanen p...@iki.fi wrote: Hi, 18.04.2012 19:57, Alan G Isaac kirjoitti: http://docs.scipy.org/doc/numpy/reference/routines.matlib.html#module-numpy.matlib promises a list of functions that does not appear (at the moment, anyway). This doesn't seem to

Re: [Numpy-discussion] documentation bug: Matrix library page not populated

2012-04-23 Thread josef . pktd
On Mon, Apr 23, 2012 at 2:05 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Thu, Apr 19, 2012 at 3:12 AM, josef.p...@gmail.com wrote: On Wed, Apr 18, 2012 at 4:14 PM, Pauli Virtanen p...@iki.fi wrote: Hi, 18.04.2012 19:57, Alan G Isaac kirjoitti:

Re: [Numpy-discussion] What is consensus anyway

2012-04-24 Thread josef . pktd
On Tue, Apr 24, 2012 at 9:43 AM, Pierre Haessig pierre.haes...@crans.org wrote: Hi, Le 24/04/2012 15:14, Charles R Harris a écrit : a) All arrays should be implicitly masked, even if the mask isn't initially allocated. The maskna keyword can then be removed, taking with it the sense that

Re: [Numpy-discussion] What is consensus anyway

2012-04-24 Thread josef . pktd
On Tue, Apr 24, 2012 at 2:35 PM, Benjamin Root ben.r...@ou.edu wrote: On Tue, Apr 24, 2012 at 2:12 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Apr 24, 2012 at 9:25 AM, josef.p...@gmail.com wrote: On Tue, Apr 24, 2012 at 9:43 AM, Pierre Haessig pierre.haes...@crans.org

Re: [Numpy-discussion] What is consensus anyway

2012-04-24 Thread josef . pktd
On Tue, Apr 24, 2012 at 11:28 PM, Fernando Perez fperez@gmail.com wrote: On Tue, Apr 24, 2012 at 8:02 PM, Charles R Harris charlesr.har...@gmail.com wrote: Fernando, I'm not checking credentials, I'm curious. Well, at least I think that an inquisitive query about someone's background,

Re: [Numpy-discussion] What is consensus anyway

2012-04-24 Thread josef . pktd
On Wed, Apr 25, 2012 at 12:25 AM, Travis Oliphant tra...@continuum.io wrote: On Apr 24, 2012, at 10:50 PM, Charles R Harris wrote: On Tue, Apr 24, 2012 at 9:28 PM, Fernando Perez fperez@gmail.com wrote: On Tue, Apr 24, 2012 at 8:02 PM, Charles R Harris charlesr.har...@gmail.com

Re: [Numpy-discussion] What is consensus anyway

2012-04-25 Thread josef . pktd
On Wed, Apr 25, 2012 at 5:54 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Wed, Apr 25, 2012 at 2:35 PM, Travis Oliphant tra...@continuum.io wrote: Do you agree that Numpy has not been very successful in recruiting and maintaining new developers compared to its large user-base?

Re: [Numpy-discussion] What is consensus anyway

2012-04-25 Thread josef . pktd
On Wed, Apr 25, 2012 at 7:08 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Wed, Apr 25, 2012 at 3:24 PM,  josef.p...@gmail.com wrote: On Wed, Apr 25, 2012 at 5:54 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Wed, Apr 25, 2012 at 2:35 PM, Travis Oliphant

Re: [Numpy-discussion] A crazy masked-array thought

2012-04-27 Thread josef . pktd
On Fri, Apr 27, 2012 at 10:33 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Fri, Apr 27, 2012 at 8:15 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, Apr 25, 2012 at 9:58 AM, Richard Hattersley rhatters...@gmail.com wrote: The masked array discussions have

[Numpy-discussion] ANN: statsmodels 0.4.0

2012-04-27 Thread josef . pktd
We are pleased to announce the release of statsmodels 0.4.0. The big changes in this release are that most models can now be used with Pandas dataframes, and that we dropped the scikits namespace. Importing scikits.statsmodels is still possible but will be removed in the future. Pandas is now a

Re: [Numpy-discussion] Alternative to R phyper

2012-04-30 Thread josef . pktd
On Mon, Apr 30, 2012 at 7:27 AM, Robert Kern robert.k...@gmail.com wrote: On Mon, Apr 30, 2012 at 12:09, Bruno Santos bacmsan...@gmail.com wrote: Hello everyone, I have a bit of code where I am using rpy2 to import R phyper so I can perform an hypergeometric test. Unfortunately our cluster

Re: [Numpy-discussion] Issue Tracking

2012-05-01 Thread josef . pktd
On Tue, May 1, 2012 at 7:48 PM, Pauli Virtanen p...@iki.fi wrote: 01.05.2012 21:34, Ralf Gommers kirjoitti: [clip] At this point it's probably good to look again at the problems we want to solve: 1. responsive user interface (must absolutely have) Now that it comes too late: with some luck,

Re: [Numpy-discussion] Issue Tracking

2012-05-01 Thread josef . pktd
On Tue, May 1, 2012 at 8:29 PM, Fernando Perez fperez@gmail.com wrote: On Tue, May 1, 2012 at 5:24 PM, Charles R Harris charlesr.har...@gmail.com wrote: I would agree that a good search facility is essential, and not keyword/tag based. Github issues does have full-text search, and up

Re: [Numpy-discussion] How to run NumPy's tests with coverage?

2012-05-06 Thread josef . pktd
On Sun, May 6, 2012 at 4:39 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sun, May 6, 2012 at 9:08 PM, Chris Ball ceb...@gmail.com wrote: Hi, I'm trying to figure out how to run NumPy's tests with coverage enabled (i.e. numpy.test(coverage=True) ). I can run the tests

Re: [Numpy-discussion] [numpy.testing] re-import when using coverage

2012-05-16 Thread josef . pktd
On Wed, May 16, 2012 at 11:05 AM, Fabrice Silva si...@lma.cnrs-mrs.fr wrote: Hi, I am getting into troubles when using numpy.testing with coverage. A minimal example package is atached to this email. Unpack and run: $ python -c import mypackage; mypackage.test(verbose=10,coverage=False) $

Re: [Numpy-discussion] Internationalization of numpy/scipy docstrings...

2012-05-22 Thread josef . pktd
On Tue, May 22, 2012 at 10:51 AM, Tim Cera t...@cerazone.net wrote: Docstrings are not stored in .rst files but in the numpy sources, so there are some non-trivial technical and workflow details missing here. But besides that, I think translating everything (even into a single language) is a

Re: [Numpy-discussion] Checking for views (was: Should arr.diagonal() return a copy or aview?)

2012-05-24 Thread josef . pktd
On Thu, May 24, 2012 at 1:59 PM, Nathaniel Smith n...@pobox.com wrote: On Thu, May 24, 2012 at 6:07 PM, Larsen, Brian A balar...@lanl.gov wrote: This is the stack overflow discussion mentioned. http://stackoverflow.com/questions/9164269/can-you-tell-if-an-array-is-a-view-of-another I

[Numpy-discussion] 1.6.2 no more unique for rows

2012-05-28 Thread josef . pktd
https://github.com/numpy/numpy/commit/74b9f5eef8fac643bf9012dbb2ac6b4b19f46892 broke return_inverse for structured arrays, because of the use of mergesort I'm using structured dtypes to get uniques and return_inverse by rows groups = np.random.randint(0,4,size=(10,2)) groups_ =

Re: [Numpy-discussion] 1.6.2 no more unique for rows

2012-05-30 Thread josef . pktd
On Wed, May 30, 2012 at 5:55 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Wed, May 30, 2012 at 5:39 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Wed, May 30, 2012 at 4:59 AM, Nathaniel Smith n...@pobox.com wrote: On Tue, May 29, 2012 at 7:42 PM, Charles R Harris

[Numpy-discussion] convert to string - astype(str)

2012-06-09 Thread josef . pktd
Is there a way to convert an array to string elements in numpy, without knowing the string length? arr2 = np.arange(8, 13) arr2.astype(str) # bad array(['8', '9', '1', '1', '1'], dtype='|S1') arr2.astype('S2') array(['8', '9', '10', '11', '12'], dtype='|S2') map(str, arr2)

Re: [Numpy-discussion] convert to string - astype(str)

2012-06-10 Thread josef . pktd
On Sun, Jun 10, 2012 at 2:17 AM, Travis Oliphant tra...@continuum.io wrote: On Jun 9, 2012, at 4:45 PM, josef.p...@gmail.com wrote: Is there a way to convert an array to string elements in numpy, without knowing the string length? Not really.   In the next release of NumPy you should be

Re: [Numpy-discussion] Matrix rank default tolerance - is it too low?

2012-06-16 Thread josef . pktd
On Sat, Jun 16, 2012 at 4:39 PM, Nathaniel Smith n...@pobox.com wrote: On Sat, Jun 16, 2012 at 9:03 PM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Sat, Jun 16, 2012 at 10:40 AM, Nathaniel Smith n...@pobox.com wrote: On Fri, Jun 15, 2012 at 4:10 AM, Charles R Harris

Re: [Numpy-discussion] Created NumPy 1.7.x branch

2012-06-25 Thread josef . pktd
On Mon, Jun 25, 2012 at 8:10 PM, Travis Oliphant tra...@continuum.io wrote: You are still missing the point that there was already a choice that was made in the previous class --- made in Numeric actually. You made a change to that.  It is the change that is 'gratuitous'.  The pain and

Re: [Numpy-discussion] Created NumPy 1.7.x branch

2012-06-25 Thread josef . pktd
On Mon, Jun 25, 2012 at 8:25 PM, josef.p...@gmail.com wrote: On Mon, Jun 25, 2012 at 8:10 PM, Travis Oliphant tra...@continuum.io wrote: You are still missing the point that there was already a choice that was made in the previous class --- made in Numeric actually. You made a change to

Re: [Numpy-discussion] Created NumPy 1.7.x branch

2012-06-25 Thread josef . pktd
On Mon, Jun 25, 2012 at 9:50 PM, Travis Oliphant tra...@continuum.io wrote: On Jun 25, 2012, at 7:53 PM, josef.p...@gmail.com wrote: On Mon, Jun 25, 2012 at 8:25 PM,  josef.p...@gmail.com wrote: On Mon, Jun 25, 2012 at 8:10 PM, Travis Oliphant tra...@continuum.io wrote: You are still

Re: [Numpy-discussion] Created NumPy 1.7.x branch

2012-06-25 Thread josef . pktd
On Mon, Jun 25, 2012 at 11:10 PM, Ondřej Čertík ondrej.cer...@gmail.com wrote: On Mon, Jun 25, 2012 at 7:38 PM, Fernando Perez fperez@gmail.com wrote: On Mon, Jun 25, 2012 at 6:39 PM, Travis Oliphant tra...@continuum.io wrote: On Jun 25, 2012, at 7:21 PM, Fernando Perez wrote: For

Re: [Numpy-discussion] NumPy 1.7 release delays

2012-06-30 Thread josef . pktd
On Sat, Jun 30, 2012 at 1:52 AM, Matthew Brett matthew.br...@gmail.com wrote: Hi, On Wed, Jun 27, 2012 at 12:38 AM, Christoph Gohlke cgoh...@uci.edu wrote: On 6/26/2012 8:13 PM, Travis Oliphant wrote: For the main repos we use buildbot and test on: Ubuntu Maverick 32-bit Debian sid 64-bit

Re: [Numpy-discussion] Meta: help, devel and stackoverflow

2012-06-30 Thread josef . pktd
just some statistics http://stackoverflow.com/questions/tagged/numpy 769 followers, 2,850 questions tagged a guess: average response time for regular usage question far less than an hour http://stackoverflow.com/questions/tagged/scipy 446 followers, 991questions tagged

Re: [Numpy-discussion] Meta: help, devel and stackoverflow

2012-06-30 Thread josef . pktd
On Sat, Jun 30, 2012 at 5:02 PM, T J tjhn...@gmail.com wrote: On Sat, Jun 30, 2012 at 1:50 PM, srean srean.l...@gmail.com wrote: Anecdotal data-point: I have been  happy with SO in general. It works for certain types of queries very well. OTOH if the answer to the question is known only to

  1   2   3   4   5   6   7   8   9   10   >