Re: [Numpy-discussion] type checking, what's recommended?

2011-12-07 Thread Olivier Delalleau
We have indeed been using "type(a) is np.ndarray" in Theano to check that. If there's a better way, I'm interested to know as well :) -=- Olivier 2011/12/7 > If I want to know whether something that might be an array is really a > plain ndarray and not a subclass, is using `type` the safest bet

[Numpy-discussion] type checking, what's recommended?

2011-12-07 Thread josef . pktd
If I want to know whether something that might be an array is really a plain ndarray and not a subclass, is using `type` the safest bet? All the other forms don't discriminate against subclasses. >>> type(np.ma.zeros(3)) is np.ndarray False >>> type(np.zeros(3)) is np.ndarray True >>> isinstance

Re: [Numpy-discussion] idea of optimisation?

2011-12-07 Thread Xavier Barthelemy
Actually this can be a good idea. i didn't thought using he sorting. i'll try thanks for yours ideas Xavier 2011/12/7 Tony Yu > > > On Tue, Dec 6, 2011 at 2:51 AM, Xavier Barthelemy wrote: > >> ok let me be more precise >> >> I have an Z array which is the elevation >> from this I extract a dis

Re: [Numpy-discussion] Simple way to launch python processes?

2011-12-07 Thread Lou Pecora
From: Jean-Baptiste Marquette To: Discussion of Numerical Python Sent: Wednesday, December 7, 2011 4:23 PM Subject: Re: [Numpy-discussion] Simple way to launch python processes? You should consider the powerful multiprocessing package. Have a look on this piece of code: importglob importos

Re: [Numpy-discussion] Simple way to launch python processes?

2011-12-07 Thread Lou Pecora
From: Olivier Delalleau To: Discussion of Numerical Python Sent: Wednesday, December 7, 2011 3:43 PM Subject: Re: [Numpy-discussion] Simple way to launch python processes? Maybe try stackoverflow, since this isn't really a numpy question. To run a command like "python myscript.py arg1 arg2"

Re: [Numpy-discussion] Slow Numpy/MKL vs Matlab/MKL

2011-12-07 Thread David Cournapeau
On Tue, Dec 6, 2011 at 5:31 PM, Oleg Mikulya wrote: > Hi, > > How to make Numpy to match Matlab in term of performance ? I have tryied > with different options, using different MKL libraries and ICC versions, > still Numpy is below Matalb for certain basic tasks by ~2x. About 5 years > ago I was a

Re: [Numpy-discussion] Slow Numpy/MKL vs Matlab/MKL

2011-12-07 Thread Derek Homeier
On 07.12.2011, at 9:38PM, Oleg Mikulya wrote: > Agree with your statement. Yes, it is MKL, indeed. For linear equations it is > no difference, but there is difference for other functions. And yes, my > suspicions is just threading options. How to pass them to MKL from python? > Should I change

Re: [Numpy-discussion] Simple way to launch python processes?

2011-12-07 Thread Jean-Baptiste Marquette
You should consider the powerful multiprocessing package. Have a look on this piece of code: import glob import os import multiprocessing as multi import subprocess as sub import time NPROC = 4 Python = '/Library/Frameworks/EPD64.framework/Versions/Current/bin/python' Xterm = '/usr/X11/bin/xterm

Re: [Numpy-discussion] Simple way to launch python processes?

2011-12-07 Thread Olivier Delalleau
Maybe try stackoverflow, since this isn't really a numpy question. To run a command like "python myscript.py arg1 arg2" in a separate process, you can do: p = subprocess.Popen("python myscript.py arg1 arg2".split()) You can launch many of these, and if you want to know if a process p is over, y

Re: [Numpy-discussion] Slow Numpy/MKL vs Matlab/MKL

2011-12-07 Thread Oleg Mikulya
Agree with your statement. Yes, it is MKL, indeed. For linear equations it is no difference, but there is difference for other functions. And yes, my suspicions is just threading options. How to pass them to MKL from python? Should I change some compiling options or environment options? On Wed, D

[Numpy-discussion] Simple way to launch python processes?

2011-12-07 Thread Lou Pecora
I would like to launch python modules or functions (I don't know which is easier to do, modules or functions) in separate Terminal windows so I can see the output from each as they execute.  I need to be able to pass each module or function a set of parameters.  I would like to do this from a py

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-07 Thread Bruce Southey
On Tue, Dec 6, 2011 at 4:13 PM, Wes McKinney wrote: > On Tue, Dec 6, 2011 at 4:11 PM, Ralf Gommers > wrote: >> >> >> On Mon, Dec 5, 2011 at 8:43 PM, Ralf Gommers >> wrote: >>> >>> Hi all, >>> >>> It's been a little over 6 months since the release of 1.6.0 and the NA >>> debate has quieted down,

[Numpy-discussion] Fast Reading of ASCII files

2011-12-07 Thread Chris.Barker
Hi folks, This is a continuation of a conversation already started, but i gave it a new, more appropriate, thread and subject. On 12/6/11 2:13 PM, Wes McKinney wrote: > we should start talking > about building a *high performance* flat file loading solution with > good column type inference and

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-07 Thread Thouis (Ray) Jones
On Tue, Dec 6, 2011 at 22:11, Ralf Gommers wrote: > To be a bit more detailed here, these are the most significant pull requests > / patches that I think can be merged with a limited amount of work: > meshgrid enhancements: http://projects.scipy.org/numpy/ticket/966 > sample_from function: https:/

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

2011-12-07 Thread Olivier Delalleau
I was trying to see if I could reproduce this problem, but your code fails with numpy 1.6.1 with: AttributeError: 'numpy.ndarray' object has no attribute 'H' Is X supposed to be a regular ndarray with dtype = 'complex128', or something else? -=- Olivier 2011/12/5 kneil > > Hi Nathaniel, > Thank

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-07 Thread Pierre Haessig
Le 07/12/2011 12:42, Pierre GM a écrit : > Ever tried to use genfromtxt ? You'll guess I didn't ... next time I'll do ;-) Thanks for the tip ! Best, Pierre ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinf

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-07 Thread Pierre GM
On Dec 07, 2011, at 11:24 , Pierre Haessig wrote: > > Now for my personal use, I was not so frustrated by loading performance > but rather by NA support, so I wrote my own loadCsv function to get a > masked array. It was nor beautiful, neither very efficient, but it does > the job ! Ever trie

Re: [Numpy-discussion] numpy 1.7.0 release?

2011-12-07 Thread Pierre Haessig
Le 06/12/2011 23:13, Wes McKinney a écrit : > I think R has two functions read.csv and read.csv2, where read.csv2 is > capable of dealing with things like European decimal format. > I may be wrong, but from R's help I understand that read.csv, read.csv2, read.delim, ... are just calls to read.tabl

Re: [Numpy-discussion] Slow Numpy/MKL vs Matlab/MKL

2011-12-07 Thread Pauli Virtanen
06.12.2011 23:31, Oleg Mikulya kirjoitti: > How to make Numpy to match Matlab in term of performance ? I have tryied > with different options, using different MKL libraries and ICC versions, > still Numpy is below Matalb for certain basic tasks by ~2x. About 5 > years ago I was able to get about sa