[Numpy-discussion] Moved matrix class into separate module

2009-09-16 Thread David Cournapeau
Hi, I just wanted to mention I integrated a patch from some time ago to make numpy.core independent from other numpy modules. This is really useful when working on involved changes at the C level. This meant moving some stuff around, in particular the matrix class and utilities is now into

[Numpy-discussion] how can we concatenate structured arrays ?

2009-09-16 Thread josef . pktd
I have two structured arrays of different types. How can I horizontally concatenate the two arrays? Is there a direct way, or do I need to start from scratch? nobs = 10 testdata = np.random.randint(3, size=(nobs,4)).view([('a',int),('b',int),('c',int),('d',int)]) testdatacont = np.random.normal(

Re: [Numpy-discussion] how can we concatenate structured arrays ?

2009-09-16 Thread Pierre GM
On Sep 16, 2009, at 4:25 AM, josef.p...@gmail.com wrote: I have two structured arrays of different types. How can I horizontally concatenate the two arrays? Is there a direct way, or do I need to start from scratch? Check numpy.lib.recfunctions, that should get you started.

Re: [Numpy-discussion] how can we concatenate structured arrays ?

2009-09-16 Thread josef . pktd
On Wed, Sep 16, 2009 at 4:25 AM, josef.p...@gmail.com wrote: I have two structured arrays of different types. How can I horizontally concatenate the two arrays? Is there a direct way, or do I need to start from scratch? nobs = 10 testdata = np.random.randint(3,

Re: [Numpy-discussion] how can we concatenate structured arrays ?

2009-09-16 Thread josef . pktd
On Wed, Sep 16, 2009 at 4:42 AM, Pierre GM pgmdevl...@gmail.com wrote: On Sep 16, 2009, at 4:25 AM, josef.p...@gmail.com wrote: I have two structured arrays of different types. How can I horizontally concatenate the two arrays? Is there a direct way, or do I need to start from scratch?

Re: [Numpy-discussion] how can we concatenate structured arrays ?

2009-09-16 Thread Skipper Seabold
On Wed, Sep 16, 2009 at 5:10 AM, josef.p...@gmail.com wrote: On Wed, Sep 16, 2009 at 4:42 AM, Pierre GM pgmdevl...@gmail.com wrote: On Sep 16, 2009, at 4:25 AM, josef.p...@gmail.com wrote: I have two structured arrays of different types. How can I horizontally concatenate the two arrays? Is

Re: [Numpy-discussion] Moved matrix class into separate module

2009-09-16 Thread Christopher Hanley
Hi, When I try running the tests on a fresh build from the trunk I receive 28 errors. Most of the errors are of the form: NameError: global name 'matrix' is not defined It looks like there was some change to the numpy namespace. I can provide a full listing of the unit test errors if

Re: [Numpy-discussion] Moved matrix class into separate module

2009-09-16 Thread David Cournapeau
On Thu, Sep 17, 2009 at 12:32 AM, Christopher Hanley chan...@stsci.edu wrote: Hi, When I try running the tests on a fresh build from the trunk I receive 28 errors.  Most of the errors are of the form: NameError: global name 'matrix' is not defined It looks like  there was some change to

Re: [Numpy-discussion] Moved matrix class into separate module

2009-09-16 Thread Christopher Hanley
My apologizes. I had remembered to remove the previous build directory but not the target installation directory. After having removed all traces of the previous numpy installation and do a clean install I receive no new errors. Sorry for the false alarm. Chris -- Christopher Hanley

[Numpy-discussion] NameError: global name 'matrix' is not defined

2009-09-16 Thread Nils Wagner
Ran 2235 tests in 25.593s FAILED (KNOWNFAIL=1, errors=28, failures=1) nose.result.TextTestResult run=2235 errors=28 failures=1 import numpy numpy.__version__ '1.4.0.dev7400' == ERROR: test_basic (test_defmatrix.TestAlgebra)

Re: [Numpy-discussion] NameError: global name 'matrix' is not defined

2009-09-16 Thread Robert Kern
On Wed, Sep 16, 2009 at 11:39, Nils Wagnernwag...@iam.uni-stuttgart.de wrote: Ran 2235 tests in 25.593s FAILED (KNOWNFAIL=1, errors=28, failures=1) nose.result.TextTestResult run=2235 errors=28 failures=1 import numpy numpy.__version__ '1.4.0.dev7400'

Re: [Numpy-discussion] NameError: global name 'matrix' is not defined

2009-09-16 Thread Nils Wagner
On Wed, 16 Sep 2009 11:41:15 -0500 Robert Kern robert.k...@gmail.com wrote: On Wed, Sep 16, 2009 at 11:39, Nils Wagnernwag...@iam.uni-stuttgart.de wrote: Ran 2235 tests in 25.593s FAILED (KNOWNFAIL=1, errors=28, failures=1) nose.result.TextTestResult run=2235 errors=28 failures=1 import

[Numpy-discussion] array multiplication

2009-09-16 Thread Ernest Adrogué
Hi, I have two 1-d arrays (a and b), and I want to create a third 2-d array, whose rows are of the form a[i]*b: c = np.zeros((len(a),b)) c[0] = a[0]*b c[1] = a[1]*b . . . Is there an easy way to do this (e.g, without a loop)? Thanks! -- Ernest ___

Re: [Numpy-discussion] array multiplication

2009-09-16 Thread Robert Kern
2009/9/16 Ernest Adrogué eadro...@gmx.net: Hi, I have two 1-d arrays (a and b), and I want to create a third 2-d array, whose rows are of the form a[i]*b: c = np.zeros((len(a),b)) c[0] = a[0]*b c[1] = a[1]*b . . . Is there an easy way to do this (e.g, without a loop)? c =

[Numpy-discussion] Simple pattern recognition

2009-09-16 Thread Gökhan Sever
Hello all, I want to be able to count predefined simple rectangle shapes on an image as shown like in this one: http://img7.imageshack.us/img7/2327/particles.png Which is in my case to count all the blue pixels (they are ice-snow flake shadows in reality) in one of the column. What is the way

Re: [Numpy-discussion] Simple pattern recognition

2009-09-16 Thread Alan G Isaac
On 9/16/2009 8:22 PM, Gökhan Sever wrote: I want to be able to count predefined simple rectangle shapes on an image as shown like in this one: http://img7.imageshack.us/img7/2327/particles.png ch.9 of

Re: [Numpy-discussion] Simple pattern recognition

2009-09-16 Thread David Warde-Farley
On 16-Sep-09, at 8:22 PM, Gökhan Sever wrote: Hello all, I want to be able to count predefined simple rectangle shapes on an image as shown like in this one: http://img7.imageshack.us/img7/2327/particles.png Which is in my case to count all the blue pixels (they are ice-snow flake

Re: [Numpy-discussion] array multiplication

2009-09-16 Thread Nadav Horesh
Or np.multiply.outer(a,b) Nadav -הודעה מקורית- מאת: numpy-discussion-boun...@scipy.org בשם Robert Kern נשלח: ה 17-ספטמבר-09 00:40 אל: Discussion of Numerical Python נושא: Re: [Numpy-discussion] array multiplication 2009/9/16 Ernest Adrogu? eadro...@gmx.net: Hi, I have two 1-d