2008/9/19 David Cournapeau <[EMAIL PROTECTED]>:
> Anne Archibald wrote:
>>
>> That was in amax/amin. Pretty much every other function that does
>> comparisons needs to be fixed to work with nans. In some cases it's
>> not even clear how: where should a sort put the nans in an array?
>
> The problem
Anne Archibald wrote:
>
> That was in amax/amin. Pretty much every other function that does
> comparisons needs to be fixed to work with nans. In some cases it's
> not even clear how: where should a sort put the nans in an array?
The problem is more on how the functions use sort than sort itself i
2008/9/18 David Cournapeau <[EMAIL PROTECTED]>:
> Anne Archibald wrote:
>>
>> I don't think I agree:
>>
>> In [4]: np.median([1,3,nan])
>> Out[4]: 3.0
>>
>> In [5]: np.median([1,nan,3])
>> Out[5]: nan
>>
>> In [6]: np.median([nan,1,3])
>> Out[6]: 1.0
>>
>
> I was referring to the fact that if you h
sorry my bad wrong python executable in ly config.
Johann
JohannCT wrote:
>
> hello, I just updated my svn repository, but I am now unable anymore to
> import numpy :
> In [1]: import numpy as np
> ---
> ImportError
hello, I just updated my svn repository, but I am now unable anymore to
import numpy :
In [1]: import numpy as np
---
ImportError Traceback (most recent call last)
/home/cohen/ in ()
/usr/lib/py
Pierre GM wrote:
> All,
> I'd like to submit the following suggestion for recarray.view, so that it
> could accept two keywords like standard ndarrays do.
> As a change in records.py can potentially affect a lot of people (probably
> more than a change in numpy.ma), I'm not confident enough to c
Anne Archibald wrote:
>
> I don't think I agree:
>
> In [4]: np.median([1,3,nan])
> Out[4]: 3.0
>
> In [5]: np.median([1,nan,3])
> Out[5]: nan
>
> In [6]: np.median([nan,1,3])
> Out[6]: 1.0
>
I was referring to the fact that if you have nan in your array, you
should use nanmean if you want to i
2008/9/18 David Cournapeau <[EMAIL PROTECTED]>:
> Peter Saffrey wrote:
>>
>> Is this the correct behavior for median with nan?
>
> That's the expected behavior, at least :) (this is also the expected
> behavior of most math packages I know, including matlab and R, so this
> should not be too surpri
All,
I'd like to submit the following suggestion for recarray.view, so that it
could accept two keywords like standard ndarrays do.
As a change in records.py can potentially affect a lot of people (probably
more than a change in numpy.ma), I'm not confident enough to commit it.
Consider that as
David Cournapeau wrote:
> If you install blas/lapack from sage, it kind of defeats the whole
> purpose of garnumpy. The goal is to have a unified set of options to
> build. It is likely that sage uses different options than the ones from
> garnumpy. If you use garnumpy, you should use it for everyt
Francis wrote:
> Thank you for your effort. I guess garnumpy reflects the idea in this
> Pylab discussion: http://www.scipy.org/PyLab
>
> Again I get errors in libblas/lapack related to gfortran (local
> variable problems). I replaced the libblas.a and the liblaplack.a by
> the ones of sage. And st
Peter Saffrey wrote:
>
> Is this the correct behavior for median with nan?
That's the expected behavior, at least :) (this is also the expected
behavior of most math packages I know, including matlab and R, so this
should not be too surprising if you have used those).
> Is there a fix for
> thi
On Thu, Sep 18, 2008 at 02:54:13PM -0500, Robert Kern wrote:
> So here's what going on: I'm being clever (and possibly too clever).
Oh no. Robert K. is too clever. We knew that, right ;).
Gaël
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
Robert Kern wrote:
> On Thu, Sep 18, 2008 at 06:26, Francis <[EMAIL PROTECTED]> wrote:
>> Thank you for your effort. I guess garnumpy reflects the idea in this
>> Pylab discussion: http://www.scipy.org/PyLab
>>
>> Again I get errors in libblas/lapack related to gfortran (local
>> variable problems)
Hi, Ryan,
Thank you very much. It solves my problem. I have struggled with this for long
time.
Frank> Date: Thu, 18 Sep 2008 16:39:47 -0500> From: [EMAIL PROTECTED]> To:
numpy-discussion@scipy.org> Subject: Re: [Numpy-discussion] A bug in loadtxt
and how to convert a string array (hex data)
On Thu, Sep 18, 2008 at 16:55, Paul Moore <[EMAIL PROTECTED]> wrote:
> I want to generate a series of random samples, to do simulations based
> on them. Essentially, I want to be able to produce a SAMPLESIZE * N
> matrix, where each row of N values consists of either
>
> 1. Integers between 1 and M
I want to generate a series of random samples, to do simulations based
on them. Essentially, I want to be able to produce a SAMPLESIZE * N
matrix, where each row of N values consists of either
1. Integers between 1 and M (simulating M rolls of an N-sided die), or
2. A sample of N numbers between
frank wang wrote:
>
>
>
> Hi, All,
>
>
>
>
>
> I have found a bug in the loadtxt function. Here is the example. The
> file name is test.txt and contains:
>
>
> "Thist is test"
>
>
> 3FF 3fE
>
>
> 3Ef 3e8
>
>
> 3Df 3d9
>
>
> 3cF 3c7
>
>
>
>
>
> In the Python 2.5.2, I type:
On Thu, Sep 18, 2008 at 06:26, Francis <[EMAIL PROTECTED]> wrote:
> Thank you for your effort. I guess garnumpy reflects the idea in this
> Pylab discussion: http://www.scipy.org/PyLab
>
> Again I get errors in libblas/lapack related to gfortran (local
> variable problems). I replaced the libblas.a
Hi, All,
I have found a bug in the loadtxt function. Here is the example. The file name
is test.txt and contains:
"Thist is test"
3FF 3fE
3Ef 3e8
3Df 3d9
3cF 3c7
In the Python 2.5.2, I type:
test=loadtxt('test.txt',comments='"',dtype='string',converters={0:lambda
s:int(s,16)})
test will
On Thu, Sep 18, 2008 at 05:46, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 18, 2008 at 1:29 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>> On Wed, Sep 17, 2008 at 18:09, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>>> Anyway, so I used it on my code and here is what I got:
>>>
>>> File: her
On Thu, Sep 18, 2008 at 10:03, Ondrej Certik <[EMAIL PROTECTED]> wrote:
> Anyway, back to work: Robert K., I noticed that if I profile some
> function, I get results like this for example:
>
>
>40 307246952 6.6 [x,w] = p_roots(n)
>41 307224192
On Thu, Sep 18, 2008 at 06:01, Robert Cimrman <[EMAIL PROTECTED]> wrote:
> Hi Robert,
>
> Robert Kern wrote:
>> On Mon, Sep 15, 2008 at 11:13, Arnar Flatberg <[EMAIL PROTECTED]> wrote:
>>> That would make me an extremely happy user, I've been looking for this for
>>> years!
>>> I can't imagine I'm
Hey,
I would like to tag 1.2.0 from the 1.2.x branch. Are there any
problems with this? In particular, are there any known problems that
would require us having another release candidate? As soon as we get
this release out we can start back-porting bugfixes from the trunk to
the 1.2.x branch in
On Thu, Sep 18, 2008 at 12:23 PM, Pierre GM <[EMAIL PROTECTED]> wrote:
> On Thursday 18 September 2008 13:31:18 Peter Saffrey wrote:
> > The version in the Ubuntu package repository. It says 1:1.0.4-6ubuntu3.
>
> So it's 1.0 ? It's fairly old, that would explain.
>
> > > if you don't give an axis
On Thursday 18 September 2008 13:31:18 Peter Saffrey wrote:
> The version in the Ubuntu package repository. It says 1:1.0.4-6ubuntu3.
So it's 1.0 ? It's fairly old, that would explain.
> > if you don't give an axis
> > parameter, you should get the median of the flattened array, therefore a
> > s
On Thu, Sep 18, 2008 at 11:31 AM, Peter Saffrey <[EMAIL PROTECTED]> wrote:
> Pierre GM gmail.com> writes:
>
> > Mmh, typo?
> >
>
> Yes, apologies. I was aiming for thorough, but ended up just careless. It's
> been
> a long day.
>
> > Ohoh. What version of numpy are you using ?
>
> The version in
Pierre GM gmail.com> writes:
> Mmh, typo?
>
Yes, apologies. I was aiming for thorough, but ended up just careless. It's been
a long day.
> Ohoh. What version of numpy are you using ?
The version in the Ubuntu package repository. It says 1:1.0.4-6ubuntu3.
> if you don't give an axis
> param
On Wed, Sep 17, 2008 at 10:33 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Wed, Sep 17, 2008 at 07:12, Arnar Flatberg <[EMAIL PROTECTED]>
> wrote:
> >
> > On Wed, Sep 17, 2008 at 3:56 AM, Robert Kern <[EMAIL PROTECTED]>
> wrote:
>
> It should be straightforward to make an ipython %magic, yes.
On Thursday 18 September 2008 10:59:12 Peter Saffrey wrote:
> I had looked at masked arrays, but couldn't quite get them to work.
That's unfortunate.
> >>> from numeric import *
Mmh, typo?
> >>> from pylab import rand
> >>> a = rand(10,3)
> >>> a[a > 0.8] = nan
> >>> m = ma.masked_array(a,
Hi,
> >>> median(m.T)
> array([ 1.e+20, 2.12298948e-01, 3.57822574e-01,
I believe 1.e+20 is a reserved value and signifys the
missing value or NaN in your case. That"s the way it was in
a Fortran77 package I worked with ten years ago...
--- On Thu, 9/18/08, Peter Saffr
> So the timing raises a lot. For obvious reasons, that's the overhead
> of the profiler. But the problem is that then the timings just don't
> fit, e.g. if I sum the total time spent in subfunctions, it doesn't
> account for all the time printed on the respective line in the parent
> function.
>
>
On Thu, Sep 18, 2008 at 4:12 PM, Ryan May <[EMAIL PROTECTED]> wrote:
> Ondrej Certik wrote:
>> On Thu, Sep 18, 2008 at 1:01 PM, Robert Cimrman <[EMAIL PROTECTED]> wrote:
It requires Cython and a C compiler to build. I'm still debating
myself about the desired workflow for using it, b
physics.ucf.edu> writes:
> Currently the only way you can handle NaNs is by using masked arrays.
> Create a mask by doing isfinite(a), then call the masked array
> median(). There's an example here:
>
> http://sd-2116.dedibox.fr/pydocweb/doc/numpy.ma/
>
I had looked at masked arrays, bu
> You might want to try isfinite() to first remove nan, +/- infinity
> before doing that.
> numpy.median(a[numpy.isfinite(a)])
We just had this discussion a month or two ago, I think even on this
list, and continued it at the SciPy conference.
The problem with
numpy.median(a[numpy.isfinite(a)])
Ondrej Certik wrote:
> On Thu, Sep 18, 2008 at 1:01 PM, Robert Cimrman <[EMAIL PROTECTED]> wrote:
>>>
>>> It requires Cython and a C compiler to build. I'm still debating
>>> myself about the desired workflow for using it, but for now, it only
>>> profiles functions which you have registered with i
Nadav Horesh wrote:
> I think you need to use masked arrays.
>
> Nadav
>
>
> -הודעה מקורית-
> מאת: [EMAIL PROTECTED] בשם Peter Saffrey
> נשלח: ה 18-ספטמבר-08 14:27
> אל: numpy-discussion@scipy.org
> נושא: [Numpy-discussion] Medians that ignore values
>
> I have data from biological expe
On Thu, Sep 18, 2008 at 1:01 PM, Robert Cimrman <[EMAIL PROTECTED]> wrote:
> Hi Robert,
>
> Robert Kern wrote:
>> On Mon, Sep 15, 2008 at 11:13, Arnar Flatberg <[EMAIL PROTECTED]> wrote:
>>> That would make me an extremely happy user, I've been looking for this for
>>> years!
>>> I can't imagine I'
I think you need to use masked arrays.
Nadav
-הודעה מקורית-
מאת: [EMAIL PROTECTED] בשם Peter Saffrey
נשלח: ה 18-ספטמבר-08 14:27
אל: numpy-discussion@scipy.org
נושא: [Numpy-discussion] Medians that ignore values
I have data from biological experiments that is represented as a list of
I have data from biological experiments that is represented as a list of
about 5000 triples. I would like to convert this to a list of the median
of each triple. I did some profiling and found that numpy was much about
12 times faster for this application than using regular Python lists and
a l
Thank you for your effort. I guess garnumpy reflects the idea in this
Pylab discussion: http://www.scipy.org/PyLab
Again I get errors in libblas/lapack related to gfortran (local
variable problems). I replaced the libblas.a and the liblaplack.a by
the ones of sage. And started make install again.
Hi Robert,
Robert Kern wrote:
> On Mon, Sep 15, 2008 at 11:13, Arnar Flatberg <[EMAIL PROTECTED]> wrote:
>> That would make me an extremely happy user, I've been looking for this for
>> years!
>> I can't imagine I'm the only one who profiles some hundred lines of code and
>> ends up with 90% of to
On Thu, Sep 18, 2008 at 1:29 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Wed, Sep 17, 2008 at 18:09, Ondrej Certik <[EMAIL PROTECTED]> wrote:
>> On Wed, Sep 17, 2008 at 3:56 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>>> On Mon, Sep 15, 2008 at 11:13, Arnar Flatberg <[EMAIL PROTECTED]> wrote:
>
Sorry for not relating to the details of the problem, but, did you take a look
pygpu? It intends to be able to enable image processing as video rate.
Nadav
-הודעה מקורית-
מאת: [EMAIL PROTECTED] בשם St?fan van der Walt
נשלח: ה 18-ספטמבר-08 10:25
אל: Discussion of Numerical Python
נושא:
Hey Brendan
2008/9/17 Brendan Simons <[EMAIL PROTECTED]>:
> I would love a c-types code snippet. I'm not very handy in c. Since
> I gather numpy is row-major, I thought I up and down crops very
> quickly by moving the start and end pointers of the array. For
> cropping left and right, is there
45 matches
Mail list logo