Re: [Numpy-discussion] np.dot and array order

2011-12-01 Thread Pauli Virtanen
01.12.2011 03:31, josef.p...@gmail.com kirjoitti: [clip] 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. It uses C-LAPACK, and will make copies if the arrays are not in C-order. -- Pauli Virtanen

Re: [Numpy-discussion] Apparently non-deterministic behaviour of complex array multiplication

2011-12-01 Thread Pierre Haessig
Le 01/12/2011 02:44, Karl Kappler a écrit : Also note that I have had a similar problem with much smaller arrays, say 24 x 3076 Hi Karl, Could you post a self-contained code with such a small array (or even smaller. the smaller, the better...) so that we can run it and play with it ? --

[Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Thouis (Ray) Jones
Is this expected behavior? np.array([-345,4,2,'ABC']) array(['-34', '4', '2', 'ABC'], dtype='|S3') np.version.full_version '1.6.1' np.version.git_revision '68538b74483009c2c2d1644ef00397014f95a696' Ray Jones ___ NumPy-Discussion mailing list

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Pierre Haessig
Le 01/12/2011 14:52, Thouis (Ray) Jones a écrit : Is this expected behavior? np.array([-345,4,2,'ABC']) array(['-34', '4', '2', 'ABC'], dtype='|S3') With my numpy 1.5.1, I got indeed a different result: In [1]: np.array([-345,4,2,'ABC']) Out[1]: array(['-345', '4', '2', 'ABC'],

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Thouis Jones
On Thu, Dec 1, 2011 at 15:47, Pierre Haessig pierre.haes...@crans.org wrote: Le 01/12/2011 14:52, Thouis (Ray) Jones a écrit : Is this expected behavior? np.array([-345,4,2,'ABC']) array(['-34', '4', '2', 'ABC'], dtype='|S3') With my numpy 1.5.1, I got indeed a different result: In [1]:

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Benjamin Root
On Thursday, December 1, 2011, Thouis Jones thouis.jo...@curie.fr wrote: On Thu, Dec 1, 2011 at 15:47, Pierre Haessig pierre.haes...@crans.org wrote: Le 01/12/2011 14:52, Thouis (Ray) Jones a écrit : Is this expected behavior? np.array([-345,4,2,'ABC']) array(['-34', '4', '2', 'ABC'],

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Thouis Jones
On Thu, Dec 1, 2011 at 16:29, Benjamin Root ben.r...@ou.edu wrote: Does the same problem occur if -345 comes after ABC? Yes. np.array(list(reversed([-345,4,2,'ABC']))) array(['ABC', '2', '4', '-34'], dtype='|S3') ___ NumPy-Discussion mailing

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Charles R Harris
On Thu, Dec 1, 2011 at 6:52 AM, Thouis (Ray) Jones tho...@gmail.com wrote: Is this expected behavior? np.array([-345,4,2,'ABC']) array(['-34', '4', '2', 'ABC'], dtype='|S3') Given that strings should be the result, this looks like a bug. It's a bit of a corner case that probably slipped

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

2011-12-01 Thread jonasr
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 ] so that i finally get A=[ [1,2,1,2] [3,4,3,4] [1,2,1,2] [3,4,3,4]] i tried different things on numpy which didn't work

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Derek Homeier
On 1 Dec 2011, at 17:39, Charles R Harris wrote: On Thu, Dec 1, 2011 at 6:52 AM, Thouis (Ray) Jones tho...@gmail.com wrote: Is this expected behavior? np.array([-345,4,2,'ABC']) array(['-34', '4', '2', 'ABC'], dtype='|S3') Given that strings should be the result, this looks like a

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

2011-12-01 Thread Benjamin Root
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 ] so that i finally get A=[ [1,2,1,2] [3,4,3,4] [1,2,1,2]

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

2011-12-01 Thread eat
Hi, On Thu, Dec 1, 2011 at 6:52 PM, 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 ] so that i finally get A=[ [1,2,1,2] [3,4,3,4]

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] build numpy matrix out of smaller matrix

2011-12-01 Thread eat
Oops, slightly incorrect answer, but anyway my intention was more along the lines: In []: a= np.array([[1, 2], [3, 4]]) In []: np.c_[[a, a], [a, a]].reshape(4, 4) Out[]: array([[1, 2, 1, 2], [3, 4, 3, 4], [1, 2, 1, 2], [3, 4, 3, 4]]) On Thu, Dec 1, 2011 at 8:16 PM,

Re: [Numpy-discussion] Apparently non-deterministic behaviour of complex array multiplication

2011-12-01 Thread kneil
Hi Oliver, indeed that was a typo, I should have used cut and paste. I was using .transpose() Olivier Delalleau-2 wrote: I guess it's just a typo on your part, but just to make sure, you are using .transpose(), not .transpose, correct? -=- Olivier 2011/11/30 Karl Kappler

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Chris Barker
On 12/1/2011 9:15 AM, Derek Homeier wrote: np.array((2, 12,0.001+2j), dtype='|S8') array(['2', '12', '(0.001+2'], dtype='|S8') - notice the last value is only truncated because it had first been converted into a standard complex representation, so maybe the problem is already in the way

Re: [Numpy-discussion] Apparently non-deterministic behaviour of complex array multiplication

2011-12-01 Thread kneil
Hi Pierre, I was thinking about uploading some examples but strangely, when I store the array using for example: np.save('Y',Y) and then reload it in a new workspace, I find that the problem does not reproduce. It would seem somehow to be associated with the 'overhead' of the workspace I am

Re: [Numpy-discussion] numpy.array() of mixed integers and strings can truncate data

2011-12-01 Thread Derek Homeier
On 1 Dec 2011, at 21:35, Chris Barker wrote: On 12/1/2011 9:15 AM, Derek Homeier wrote: np.array((2, 12,0.001+2j), dtype='|S8') array(['2', '12', '(0.001+2'], dtype='|S8') - notice the last value is only truncated because it had first been converted into a standard complex

Re: [Numpy-discussion] Apparently non-deterministic behaviour of complex array multiplication

2011-12-01 Thread Joe Kington
On Thu, Dec 1, 2011 at 2:47 PM, kneil magnetotellur...@gmail.com wrote: Hi Pierre, I was thinking about uploading some examples but strangely, when I store the array using for example: np.save('Y',Y) and then reload it in a new workspace, I find that the problem does not reproduce. It

Re: [Numpy-discussion] scipy.org still says source in some subversion repo -- should be git !?

2011-12-01 Thread Jarrod Millman
On Mon, Nov 28, 2011 at 1:19 PM, Matthew Brett matthew.br...@gmail.comwrote: Maybe the content could be put in http://github.com/scipy/scipy.github.com so we can make pull requests there? The source is here: https://github.com/scipy/scipy.org-new

Re: [Numpy-discussion] scipy.org still says source in some subversion repo -- should be git !?

2011-12-01 Thread Matthew Brett
Yo, On Thu, Dec 1, 2011 at 8:01 PM, Jarrod Millman mill...@berkeley.edu wrote: On Mon, Nov 28, 2011 at 1:19 PM, Matthew Brett matthew.br...@gmail.com wrote: Maybe the content could be put in http://github.com/scipy/scipy.github.com so we can make pull requests there? The source is here:

Re: [Numpy-discussion] Apparently non-deterministic behaviour of complex array multiplication

2011-12-01 Thread kneil
Hi Pierre, I confirmed with the guy who put together the machine that it is non-ECC RAM. You know, now that i think about it, this machine seems to crash a fair amount more often than its identical twin which sits on a desk near me. I researched memtest a bit... downloaded and compiled it, but