Re: [Numpy-discussion] clip() with None as argument

2010-09-09 Thread Chris Ball
Robert Kern robert.kern at gmail.com writes: On Wed, Sep 8, 2010 at 14:42, Chris Ball ceball at gmail.com wrote: Robert Kern robert.kern at gmail.com writes: ... a = numpy.array([1,2,3,4,5]) a.clip(2,None) array([2, 2, 2, 2, 2], dtype=object) I'm not sure why the returned array

Re: [Numpy-discussion] clip() with None as argument

2010-09-09 Thread Robert Kern
On Thu, Sep 9, 2010 at 05:05, Chris Ball ceb...@gmail.com wrote: Robert Kern robert.kern at gmail.com writes: On Wed, Sep 8, 2010 at 14:42, Chris Ball ceball at gmail.com wrote: Robert Kern robert.kern at gmail.com writes: ... a = numpy.array([1,2,3,4,5]) a.clip(2,None) array([2, 2,

[Numpy-discussion] Fwd: distutils

2010-09-09 Thread Charles Doutriaux
Original Message Subject:[Numpy-discussion] distutils Date: Tue, 7 Sep 2010 12:12:58 -0700 From: Charles Doutriaux doutria...@llnl.gov Reply-To: Discussion of Numerical Python numpy-discussion@scipy.org To: Discussion of Numerical Python

Re: [Numpy-discussion] distutils

2010-09-09 Thread Robert Kern
On Tue, Sep 7, 2010 at 14:12, Charles Doutriaux doutria...@llnl.gov wrote:  Hi, I'm using distutils to build extensions written in C. I noticed that lately (it seems to be python 2.7 related) whenever I touch 1 C file, ALL the C files are rebuilt. Since I have a lot of C code, it takes a

[Numpy-discussion] Silent DeprecationWarnings under Python 2.7 onwards

2010-09-09 Thread Peter
Hi all, NumPy currently makes extensive use of the DeprecationWarning class to alert users when some feature is going to be withdrawn. However, as of Python 2.7, the DeprecationWarning is silent by default, see:

Re: [Numpy-discussion] inversion of large matrices

2010-09-09 Thread Sturla Molden
Yes, this is what I am computing. I am computing the pdf of a very high- dimensional multivariate normal. Is there a specialized method to compute this? If you use cho_solve and cho_factor from scipy.linalg, you can proceed like this: cx = X - m sqmahal =

Re: [Numpy-discussion] inversion of large matrices

2010-09-09 Thread Pauli Virtanen
Thu, 09 Sep 2010 18:18:29 +0200, Sturla Molden wrote: [clip] I hope the SciPy dev team can be persuaded to include a wrapper for DTRTRS in the future. It is after all extremely useful for Mahalanobis distances, and thus for any use of linear models in statistics. I don't see reasons why not to

[Numpy-discussion] Inverting argsort(a, axis=0) to obtain column-wise ranks

2010-09-09 Thread Alexander Michael
Clever and concise (and expect that it works), but isn't this less efficient? Sorting is O(n*log(n)), while the code I gave is O(n). Using argsort has the potential to use less memory, though. On Tuesday, September 7, 2010, Zachary Pincus zachary.pin...@yale.edu wrote: indices = argsort(a1)

[Numpy-discussion] Inverting argsort(a, axis=0) to obtain column-wise ranks

2010-09-09 Thread Alexander Michael
Clever and concise (and expect that it works), but isn't this less efficient? Sorting is O(n*log(n)), while the code I gave is O(n). Using argsort has the potential to use less memory, though. On Tuesday, September 7, 2010, Zachary Pincus zachary.pin...@yale.edu wrote: indices = argsort(a1)

Re: [Numpy-discussion] Inverting argsort(a, axis=0) to obtain column-wise ranks

2010-09-09 Thread Robert Kern
On Thu, Sep 9, 2010 at 15:59, Alexander Michael lxande...@gmail.com wrote: Clever and concise (and expect that it works), but isn't this less efficient? Sorting is O(n*log(n)), while the code I gave is O(n). Using argsort has the potential to use less memory, though. No, the code you gave is

[Numpy-discussion] weighted mean; weighted standard error of the mean (sem)

2010-09-09 Thread cpblpublic
I am looking for some reaally basic statistical tools. I have some sample data, some sample weights for those measurements, and I want to calculate a mean and a standard error of the mean. Here are obvious places to look: numpy scipy.stats statsmodels It seems to me that numpy's mean and

Re: [Numpy-discussion] weighted mean; weighted standard error of the mean (sem)

2010-09-09 Thread Erin Sheldon
Excerpts from cpblpublic's message of Thu Sep 09 22:22:05 -0400 2010: I am looking for some reaally basic statistical tools. I have some sample data, some sample weights for those measurements, and I want to calculate a mean and a standard error of the mean. Here are obvious places to look:

Re: [Numpy-discussion] weighted mean; weighted standard error of the mean (sem)

2010-09-09 Thread josef . pktd
On Thu, Sep 9, 2010 at 10:22 PM, cpblpublic cpblpublic+nu...@gmail.com wrote: I am looking for some reaally basic statistical tools. I have some sample data, some sample weights for those measurements, and I want to calculate a mean and a standard error of the mean. Here are obvious places

[Numpy-discussion] ANNOUNCE: mahotas 0.5

2010-09-09 Thread Luis Pedro Coelho
Hello everyone, My numpy based image processing toolbox has just had a new release: 0.5 New features are: Distance transform bwperim() freeimage interface [borrowed and improved from scikits.image] zernike moment computation There were some fixes to the namespace (in particular,

Re: [Numpy-discussion] weighted mean; weighted standard error of the mean (sem)

2010-09-09 Thread Keith Goodman
On Thu, Sep 9, 2010 at 7:22 PM, cpblpublic cpblpublic+nu...@gmail.com wrote: I am looking for some reaally basic statistical tools. I have some sample data, some sample weights for those measurements, and I want to calculate a mean and a standard error of the mean. How about using a bootstrap?

Re: [Numpy-discussion] weighted mean; weighted standard error of the mean (sem)

2010-09-09 Thread Keith Goodman
On Thu, Sep 9, 2010 at 8:07 PM, Keith Goodman kwgood...@gmail.com wrote: On Thu, Sep 9, 2010 at 7:22 PM, cpblpublic cpblpublic+nu...@gmail.com wrote: I am looking for some reaally basic statistical tools. I have some sample data, some sample weights for those measurements, and I want to

Re: [Numpy-discussion] weighted mean; weighted standard error of the mean (sem)

2010-09-09 Thread josef . pktd
On Thu, Sep 9, 2010 at 11:32 PM, Keith Goodman kwgood...@gmail.com wrote: On Thu, Sep 9, 2010 at 8:07 PM, Keith Goodman kwgood...@gmail.com wrote: On Thu, Sep 9, 2010 at 7:22 PM, cpblpublic cpblpublic+nu...@gmail.com wrote: I am looking for some reaally basic statistical tools. I have some

Re: [Numpy-discussion] Inverting argsort(a, axis=0) to obtain column-wise ranks

2010-09-09 Thread Alexander Michael
I was, of course, just thinking of the incremental work of inverting the initial argsort, but you are completely correct in pointing out that the overall complexity is O(n*log(n)) either way. As it turns out, both approaches run in the same amount of time for my problem. Thanks, Alex On

Re: [Numpy-discussion] weighted mean; weighted standard error of the mean (sem)

2010-09-09 Thread Keith Goodman
On Thu, Sep 9, 2010 at 8:44 PM, josef.p...@gmail.com wrote: On Thu, Sep 9, 2010 at 11:32 PM, Keith Goodman kwgood...@gmail.com wrote: On Thu, Sep 9, 2010 at 8:07 PM, Keith Goodman kwgood...@gmail.com wrote: On Thu, Sep 9, 2010 at 7:22 PM, cpblpublic cpblpublic+nu...@gmail.com wrote: I am