[Numpy-discussion] Equivalent Matlab function

2010-09-02 Thread Matthieu Brucher
Hi, I'm looking for a Numpy equivalent of convmtx (http://www.mathworks.in/access/helpdesk/help/toolbox/signal/convmtx.html). Is there something inside Numpy directly? or perhaps Scipy? Matthieu -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn:

Re: [Numpy-discussion] kron produces F-contiguous?

2010-09-02 Thread Neal Becker
Lisandro Dalcin wrote: On 1 September 2010 19:24, Neal Becker ndbeck...@gmail.com wrote: It seems if I call kron with 2 C-contiguous arrays, it returns an F- contiguous array. Any reason for this (it's not what I wanted)? Try numpy.linalg.inv ... I don't understand. What has

Re: [Numpy-discussion] kron produces F-contiguous?

2010-09-02 Thread Pauli Virtanen
Wed, 01 Sep 2010 18:24:16 -0400, Neal Becker wrote: It seems if I call kron with 2 C-contiguous arrays, it returns an F- contiguous array. Any reason for this (it's not what I wanted)? Implementation detail. I don't think we have or want to have a policy of C-contiguous return values -- if

Re: [Numpy-discussion] Equivalent Matlab function

2010-09-02 Thread josef . pktd
On Thu, Sep 2, 2010 at 3:56 AM, Matthieu Brucher matthieu.bruc...@gmail.com wrote: Hi, I'm looking for a Numpy equivalent of convmtx (http://www.mathworks.in/access/helpdesk/help/toolbox/signal/convmtx.html). Is there something inside Numpy directly? or perhaps Scipy? I haven't seen it in

Re: [Numpy-discussion] Github migration?

2010-09-02 Thread Charles R Harris
On Mon, Aug 30, 2010 at 3:08 PM, Pauli Virtanen p...@iki.fi wrote: Mon, 23 Aug 2010 21:15:55 +, Pauli Virtanen wrote: [clip] in the history to have the wrong content -- so to be sure, we have to do a brute-force comparison of the tree against SVN for each commit. The particular bug

Re: [Numpy-discussion] Github migration?

2010-09-02 Thread Jason McCampbell
On Wed, Sep 1, 2010 at 10:46 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Tue, Aug 31, 2010 at 2:56 PM, Jason McCampbell jmccampb...@enthought.com wrote: Hi Chuck (and anyone else interested), I updated the refactoring page on the NumPy developer wiki (seems to be down or

Re: [Numpy-discussion] Github migration?

2010-09-02 Thread Jason McCampbell
On Wed, Sep 1, 2010 at 9:07 PM, Charles R Harris charlesr.har...@gmail.comwrote: Hi Jason, On Tue, Aug 31, 2010 at 2:56 PM, Jason McCampbell jmccampb...@enthought.com wrote: Hi Chuck (and anyone else interested), I updated the refactoring page on the NumPy developer wiki (seems to be

Re: [Numpy-discussion] Github migration?

2010-09-02 Thread Charles R Harris
On Thu, Sep 2, 2010 at 8:51 AM, Jason McCampbell jmccampb...@enthought.comwrote: On Wed, Sep 1, 2010 at 9:07 PM, Charles R Harris charlesr.har...@gmail.com wrote: Hi Jason, On Tue, Aug 31, 2010 at 2:56 PM, Jason McCampbell jmccampb...@enthought.com wrote: Hi Chuck (and anyone else

Re: [Numpy-discussion] Unexpected float96 precision loss

2010-09-02 Thread Christopher Barker
Charles R Harris wrote: So if you write float96(0.0001), the result is not the float96 number closest to 0.0001, but the 96-bit representation of the 64-bit number closest to 0.0001. ... but wouldn't it be better to exactly handle strings since those can be converted exactly, which is what

Re: [Numpy-discussion] Github migration?

2010-09-02 Thread Jason McCampbell
On Thu, Sep 2, 2010 at 10:25 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Sep 2, 2010 at 8:51 AM, Jason McCampbell jmccampb...@enthought.com wrote: On Wed, Sep 1, 2010 at 9:07 PM, Charles R Harris charlesr.har...@gmail.com wrote: Hi Jason, On Tue, Aug 31, 2010 at

Re: [Numpy-discussion] Equivalent Matlab function

2010-09-02 Thread Matthieu Brucher
Thanks Joseph, I'll wrap this inside my code ;) Matthieu 2010/9/2 josef.p...@gmail.com: On Thu, Sep 2, 2010 at 3:56 AM, Matthieu Brucher matthieu.bruc...@gmail.com wrote: Hi, I'm looking for a Numpy equivalent of convmtx

Re: [Numpy-discussion] Unexpected float96 precision loss

2010-09-02 Thread Colin Macdonald
On 09/02/10 17:06, Christopher Barker wrote: Does the clib for a compiler that provides a float64 also provide an atof() function that supports it? Its seems that it should. I think so, for example in C I can do: fscanf(fp, %Lf %Lf %Lf, x, y, z); where x,y,z are long doubles. The equivalent

Re: [Numpy-discussion] Github migration?

2010-09-02 Thread Charles R Harris
On Thu, Sep 2, 2010 at 10:55 AM, Jason McCampbell jmccampb...@enthought.com wrote: On Thu, Sep 2, 2010 at 10:25 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Sep 2, 2010 at 8:51 AM, Jason McCampbell jmccampb...@enthought.com wrote: On Wed, Sep 1, 2010 at 9:07 PM,

Re: [Numpy-discussion] Unexpected float96 precision loss

2010-09-02 Thread Pauli Virtanen
Thu, 02 Sep 2010 18:13:23 +0100, Colin Macdonald wrote: On 09/02/10 17:06, Christopher Barker wrote: Does the clib for a compiler that provides a float64 also provide an atof() function that supports it? Its seems that it should. I think so, for example in C I can do: fscanf(fp, %Lf %Lf

Re: [Numpy-discussion] Github migration?

2010-09-02 Thread Pauli Virtanen
Thu, 02 Sep 2010 08:27:18 -0600, Charles R Harris wrote: [clip] Hi Pauli, I gave it a quick spin and it looks good so far. The cloning was really fast, I like that ;) Is there any way to test out commiting? I didn't have permissions to push to the repository. You should have push permissions

Re: [Numpy-discussion] Unexpected float96 precision loss

2010-09-02 Thread Chris Barker
Pauli Virtanen wrote: We'll just need to add long double versions of NumPyOS_ascii_strtod and NumPyOS_ftolf that call sscanf with the correct format string in the end. hmm -- if you're going to do that, maybe we could re-factor and use sscanf everywhere instead of ato*() -- the ato* functions

Re: [Numpy-discussion] Github migration?

2010-09-02 Thread Charles R Harris
On Thu, Sep 2, 2010 at 11:51 AM, Pauli Virtanen p...@iki.fi wrote: Thu, 02 Sep 2010 08:27:18 -0600, Charles R Harris wrote: [clip] Hi Pauli, I gave it a quick spin and it looks good so far. The cloning was really fast, I like that ;) Is there any way to test out commiting? I didn't have

Re: [Numpy-discussion] Github migration?

2010-09-02 Thread Pauli Virtanen
Thu, 02 Sep 2010 12:22:30 -0600, Charles R Harris wrote: [clip] I do have a question of how the maintenance branch shows up in the github network tool, that is, I expected to see the different release branches coming off the master branch whereas the all seem to be points along mainteance.

[Numpy-discussion] Histogram does not preserve subclasses of ndarray (e.g. masked arrays)

2010-09-02 Thread Joe Kington
Hi all, I just wanted to check if this would be considered a bug. numpy.histogram does not appear to preserve subclasses of ndarrays (e.g. masked arrays). This leads to considerable problems when working with masked arrays. (As per this Stack Overflow

Re: [Numpy-discussion] Histogram does not preserve subclasses of ndarray (e.g. masked arrays)

2010-09-02 Thread Bruce Southey
On 09/02/2010 02:50 PM, Joe Kington wrote: Hi all, I just wanted to check if this would be considered a bug. numpy.histogram does not appear to preserve subclasses of ndarrays (e.g. masked arrays). This leads to considerable problems when working with masked arrays. (As per this Stack

Re: [Numpy-discussion] Boolean arrays

2010-09-02 Thread Neil Crighton
Ideally, I would like in1d to always be the right answer to this problem. It should be easy to put in an if statement to switch to a kern_in()-type function in the case of large ar1 but small ar2. I will do some timing tests and make a patch. I uploaded a timing test and a patch

Re: [Numpy-discussion] Histogram does not preserve subclasses of ndarray (e.g. masked arrays)

2010-09-02 Thread josef . pktd
On Thu, Sep 2, 2010 at 3:50 PM, Joe Kington jking...@wisc.edu wrote: Hi all, I just wanted to check if this would be considered a bug. numpy.histogram does not appear to preserve subclasses of ndarrays (e.g. masked arrays).  This leads to considerable problems when working with masked

Re: [Numpy-discussion] Histogram does not preserve subclasses of ndarray (e.g. masked arrays)

2010-09-02 Thread Joe Kington
On Thu, Sep 2, 2010 at 5:31 PM, josef.p...@gmail.com wrote: On Thu, Sep 2, 2010 at 3:50 PM, Joe Kington jking...@wisc.edu wrote: Hi all, I just wanted to check if this would be considered a bug. numpy.histogram does not appear to preserve subclasses of ndarrays (e.g. masked arrays).

[Numpy-discussion] PyGTK breaks fortran extension???

2010-09-02 Thread Åsmund Hjulstad
Hi, all, I have a f2py wrapped fortran extension, compiled using gcc-mingw32 (v.4.5.0), numpy 1.5, Python 2.7, where I am experiencing the strangest behaviour. It appears that loading pygtk breaks my fortran extension. The fortran code has initialization code (it calculates reference state for a