;*/*')
results = pool.map_async(CompareColourRef, Champs)
pool.close()
while results._number_left > 0:
print"Waiting for", results._number_left, 'tasks to complete'
time.sleep(15)
pool.join()
print'Process completed'
exit(0)
Cheers
Jean-Baptiste
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,
you can call p.poll().
I'm sure there are other (and better) options though.
-=- Olivier
want to run
eventually in 12 cores.
I have a Mac Pro running Mac OS X 10.6.
If there is a better forum to ask this question, please let me know.
Thanks for any advice.
-- Lou Pecora, my views are my own.___
NumPy-Discussion mailing list
NumPy-Di
; of "squaring" the original matrix for several
years and it's worked every time. I'm not sure why. It was just a test and it
worked.
You could also change the underlying C or Fortran code, but you then have to
recompile everything in numpy. I wasn't that brave
ut your
case correctly). But it's worth trying since it's easy to do.
-- Lou Pecora, my views are my own.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
ssly. The installation
contains
a LOT of python stuff (including all the packages mentioned here) and you use
it
just like any other installation except you need to point to the sage folder.
There are examples in the documentation.
-- Lou Pecora, my views
From: Charles R Harris
To: Discussion of Numerical Python
Sent: Fri, November 12, 2010 10:34:58 AM
Subject: Re: [Numpy-discussion] Change in Python/Numpy numerics with Py version
2.6 ?
On Fri, Nov 12, 2010 at 8:02 AM, Lou Pecora wrote:
I ran across what
- Original Message
From: Robert Kern
To: Discussion of Numerical Python
Sent: Fri, November 12, 2010 10:39:54 AM
Subject: Re: [Numpy-discussion] Change in Python/Numpy numerics with Py version
2.6 ?
On Fri, Nov 12, 2010 at 09:02, Lou Pecora wrote:
> I ran across what seems to b
ine
again. I am wondering if there are other changes that I should be aware of.
Does anyone know the origin of the change above or other differences in the
handling of numerics between the two versions?
Thanks for any insight.
-- Lou Pecora, my views are my own.
_
in a much
easier way. I was into writing "bare" C extensions from the ground up like you
when someone put me onto ctypes. MUCH easier and cleaner and, as a result,
easier to debug. I recommend it.
-- Lou Pecora, my views are my own.
,
then it is worth spending some time learning about linear systems.
-- Lou Pecora, my views are my own.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
- Original Message
From: Christopher Barker
To: Discussion of Numerical Python
Sent: Thu, November 12, 2009 12:37:37 PM
Subject: Re: [Numpy-discussion] finding close together points.
Lou Pecora wrote:
> a KD tree for 2D nearest neighbor seems like over kill. You
> might want
much easier to program.
-- Lou Pecora, my views are my own.
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
or something else?
Yes.
--
Robert Kern
HAHAHA! Reminds me of when my son was little and we asked, "Do you want
vanilla or chocolate ice cream." He would answer, "Yes."
Robert, did you mean it used math.h OR that it used something else? :-)
-- Lou Peco
ini step toward 3.0. The problem with
each step is that all the libraries we rely on have to be ugraded to that step
or we might lose the functionality of that library. For me that's a killer. I
have to take a good look at all of them before the upgrade or a big project
will take a fatal
t; Now for the other two special representations, I would
> presume that
> Numpy's PZERO (positive zero) and NZERO (negative zero)
> are treated as
> nothing. Conversion to integer for these should be zero.
Yet another +1.
-- Lou Pecora, my views are my own.
_
Whoops. I see you have profiled your code. Sorry to re-suggest that.
But I agree with those who suggest a C speed up using ctypes or cthyon.
However, thanks for posting your question. It caused a LOT of very useful
responses that I didn't know about. Thanks to all who replied.
-
rom Python?
-- Lou Pecora, my views are my own.
--- On Tue, 3/3/09, Jonathan Taylor wrote:
> From: Jonathan Taylor
> Subject: Re: [Numpy-discussion] Faster way to generate a rotation matrix?
> To: "Discussion of Numerical Python"
> Date: Tuesday, March 3, 2009, 11:41 PM
that matrix are the
square of the singular values of A. This worked for me, but my original matrix
was square. Maybe that helped. Don't know. It's worth a try.
-- Lou Pecora, my views are my own.
--- On Mon, 2/2/09, mtrum...@berkeley.edu wrote:
> From: mtrum...@berkeley.e
write and later read the list from the
file and then convert the list that is read in back to an array:
[ls_str]=fp.readline()
ls_in= eval(ls_str)
arr_in=array(ls_in) # arr_in is same as arr
Seems to work well. Any comments?
-- Lou Pecora, my views are my own.
--- On Tue, 12/9/08, Lou P
), but this is a binary format, not a text one.
>
> --
> Robert Kern
>
Thanks, Robert. I may have to go that route, assuming that the save and load
pair preserve shape, i.e. I don't have to know the shape when I read
est. I will be saving
arrays whose shape I may not know later when I read them in. I'd like that
information to be preserved.
Thanks.
-- Lou Pecora, my views are my own.
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
but I'm wondering what is the most straight-forward? I really
like the simple, pythonic approach of the repr - eval pairing.
Thanks for any advice. (yes, I am googling, too)
-- Lou Pecora, my views are my own.
___
Numpy-discussion mail
CHINE
INTELLIGENCE 19 (9), 989 (1997).
-- Lou Pecora, my views are my own.
--- On Thu, 7/10/08, Dan Lussier <[EMAIL PROTECTED]> wrote:
> From: Dan Lussier <[EMAIL PROTECTED]>
> Subject: [Numpy-discussion] huge array calculation speed
> To: numpy-discussion@scipy.org
>
e flexibility. You can admonish
against from ... import * for newbies and then tell
them to use from ... import actual function names (as
mentioned above). But locking people into a standard,
even an informal one is, as someone else said, acting
a bit too much like accountants. Stop, please!
Travis, Does that mean it's not worth starting a
ticket? Sounds like nothing can be done, *except* to
put this in the documentation and the FAQ. It has
bitten several people.
--- "Travis E. Oliphant" <[EMAIL PROTECTED]>
wrote:
> Stéfan van der Walt wrote:
>>
ompile? Otherwise, the
fix remains well hidden. Most user will be left
puzzled. I think a comment in the raise statement
would be good. Just point to the solution or where
the user could find it.
-- Lou Pecora
tion to
reset the limit on the number of iterations.
-- Lou Pecora, my views are my own.
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
___
me.
Thanks for your help.
-- Lou Pecora, my views are my own.
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62
my version).
Does anyone have a fix? Should I start a ticket (I
think this is what people do)? Any help appreciated.
I'm using a Mac Book Pro (Intel chip), system 10.4.11,
Python 2.4.4.
-- Lou Pecora, my views are my own.
_
unction J0_bess
# The second line is from the python code that called
the shared lib. function
J0(0.2) = 9.900249722395765284e-01
x, y: 2.00e-01 9.900249722395765284e-01
-- Lou Pecora, my views are my own.
___
--- David Cournapeau <[EMAIL PROTECTED]>
wrote:
> On Wed, 2008-02-13 at 08:20 -0800, Lou Pecora wrote:
> > Yes, a good question. Two reasons I started off
> with
> > the static library. One is that Gnu instructions
> > claimed the dynamic library did not always bu
fast enough and not take up too much in resources
to matter.
Later today I will try to build the dynamic version of
GSL and see what that yields. If I get it I will link
to that as you suggest.
Thanks, again. Your suggestions have moved me along
nicely.
at run time if do this with GSL. It would
be nice to only pick up the stuff I need. But at least
I have workable approach.
Thanks for your help. Comments welcome.
-- Lou Pecora, my views are my own.
_
27;ve
> got the right
> idea.
>
> Regards,
>
> Albert
Thanks, Albert. I'll report back to this thread when
I give it a try.
-- Lou Pecora, my views are my own.
Looking for last m
--- Jon Wright <[EMAIL PROTECTED]> wrote:
> Lou Pecora wrote:
> >... This appears to be the way
> > static and shared libraries work, especially on
> Mac OS
> > X, maybe elsewhere.
>
> Have you tried linking against a GSL static library?
> I don't
back out through
the Python interface. So you are right, I do not want to wrap GSL.
It sounds like I can just add something like -lnameofGSLdylib (where I put
in the real name of the GSL library after the -l) in my gcc command to make my
shared lib. Is that right?
Thanks for your help.
riticizing CTypes. This appears to be the way
static and shared libraries work, especially on Mac OS
X, maybe elsewhere.
I'd really like to be wrong about this and I will
follow up on some of the suggested reading you all
gave me.
Thanks, again.
-- Lou Pecora, my v
h flags
> are needed to compile extensions on the host
> platform. There are many
> examples on the web on how to use distutils to build
> C extensions
> (http://docs.python.org/ext/building.html).
[cut]
googling. Nothing so far. Thanks.
-- Lou Pecora, my views are my own.
-
Never miss a thing. Make Yahoo your homepage.___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.
default path was
to my home directory. I could probably change paths
with a python os call, too.
Anyway, IT WORKED! How 'bout that? One simple
example down and now on to more complex things.
Thanks, again.
-- Lou Pecora, my views are my own.
__
ould give me a clue,
but no luck.
Any ideas what I'm doing wrong? Thanks for any clues.
-- Lou Pecora, my views are my own.
Never miss a t
asily on Mac OS X 10.4.11 and
it passed the test using python setup.py test. Now I
have to find some examples on using it and learn to
compile shared libraries (.so type I guess).
-- Lou Pecora, my views are my own.
_
Hmmm... last time I tried ctypes it seemed pretty
Windows oriented and I got nowhere. But enough people
have said how easy it is that I'll give it another
try.
Believe me, I'd be happy to be wrong and find a nice
easy way to pass NumPy arrays and such. Thanks.
-- Lou Pecora
--- Christopher Barker <[EMAIL PROTECTED]> wrote:
> Lou Pecora wrote:
> > I
> > would recommend using the C API
>
> I would recommend against this -- there is a lot of
> code to write in
> extensions to make sure you do reference counting,
> etc, and it
ry method with a C
> function and recreate the class in Python.
> This can be avoided, but you'll have to use more
> powerful tools. I would
> advice SWIG (see my blog for some examples with C++
> and SWIG).
>
> Matthieu
Ah, yes, I will also recommend
ing a very minimal understanding of C++) would
> be much
> appreciated. At this point, I can't release the
> code however for
> review. Thank you.
>
> --
> Vince Fulco
-- Lou Pecora, my views are my own.
Hmmm... Interesting. I am using Python 2.4.4. It
would be nice to have other Mac people with same/other
Python and numpy versions try the argsort "bug" code.
-- Lou Pecora
--- Francesc Altet <[EMAIL PROTECTED]> wrote:
> A Tuesday 29 January 2008, Lou Pecora escrigué:
&g
handling a
memory problem IMHO. Let us Mac people not be too
smug.
-- Lou Pecora
--- Alexandre Fayolle <[EMAIL PROTECTED]>
wrote:
> On Tue, Jan 29, 2008 at 02:58:15PM +0100, Oriol
> Vendrell wrote:
> > Hi all,
> >
> > I've noticed something that looks like
libaid_wrap.o:libaid_wrap.c:(.text+0xc216):
> undefined reference to `import_array'
> collect2: ld returned 1 exit status
> error: command 'gcc' failed with exit status 1
-- Lou Pecora, my views are my own.
Brian Granger wrote:
> On Nov 20, 2007 7:33 AM, Lou Pecora <[EMAIL PROTECTED]> wrote:
>
>
>> Lately, I've been coding up a package to solved
>> Schrodinger's Equation for 2D arbitrarily shaped,
>> infinite wall potentials. I've sett
er running functions (bottle
necks). I've done that before and it's a big help for
speed.
-- Lou Pecora, my views are my own.
Be a better sports nut! Let your teams follow you
with Yahoo Mo
Works fine on my computer (Mac OS X 10.4), Python
2.4. Runs in a second or so.
-- Lou Pecora
---Peter wrote:
Hi all,
The following code calling numpy v1.0.4 fails to
terminate on my machine, which was not the case with
v1.0.3.1
from numpy import arange, float64
from numpy.linalg
tuff
Let me know if it works. I like to keep on top of
this since these things seem to change at times and
little things like this can trip you up.
-- Lou Pecora, my views are my own.
Be a better Globe
Nadia Dencheva <[EMAIL PROTECTED]> wrote:
> Is indexing with floats really allowed in numpy?
>
>
> >>> a=numpy.array([1,2,3,4])
> >>> a[2.99]
> 3
-- Lou Pecora, my views are my own.
__
ep-r))
>
> with r = finfo(double).resolution instead of
> ceil((stop-start)/step)
> perhaps be useful?
>
> Joris
-- Lou Pecora, my views are my own.
Catch up on fall's hot ne
the proper magnitude of
complex vectors
-- Lou Pecora, my views are my own.
---
Great spirits have always encountered violent opposition from mediocre minds.
-Albert Einstein
Moody friends.
t you started. Note
that once you get the patterns down for NumPy then
other extensions are mostly the same pattern over and
over.
-- Lou Pecora
-
> > 2007/7/24, computer_guy < [EMAIL PROTECTED]>:
> >
> > > Hi Everyone,
m), for a dynamical system that I would be
> willing to write
> about and contribute.
-- Lou Pecora, my views are my own.
---
Great spirits have always encountered violent opposition from m
Hi, Jim,
Just wondering why you would use item() rather than
index in brackets, i.e. a[i] ? The latter works
well in numpy. But maybe I'm missing something.
-- Lou Pecora
--- Jim Kleckner <[EMAIL PROTECTED]> wrote:
> I'm fighting conversion from Numeric to numpy.
&
SciPy cookbook,
but I bet it would reach more people in a journal.
I also suggest that articles on using packages like
matplotlib/pylab for scientific purposes also be
included.
-- Lou Pecora, my views are my own.
---
Great spirits have always encountered violent opposition from
t;do what thou wilt
> shall be the
> whole of the law"?). It's certainly not competition
> for ipython1,
> though, it's mostly to show an example of making
> threads easy to use.
>
> Anne
Please put the parallel map code on the Wiki. I found
your first (o
Very nice. Thanks. Examples are welcome since they
are usually the best to get up to speed with
programming concepts.
--- Anne Archibald <[EMAIL PROTECTED]> wrote:
> On 17/04/07, Lou Pecora <[EMAIL PROTECTED]>
> wrote:
> > I get what you are saying, but I'm not
Ii get what you are saying, but I'm not even at the
Stupidly Easy Parallel level, yet. Eventually.
Thanks.
--- Anne Archibald <[EMAIL PROTECTED]> wrote:
> On 17/04/07, Lou Pecora <[EMAIL PROTECTED]>
> wrote:
> > Now, I didn't know that. That's cool bec
Now, I didn't know that. That's cool because I have a
new dual core Intel Mac Pro. I see I have some
learning to do with multithreading. Thanks.
--- Anne Archibald <[EMAIL PROTECTED]> wrote:
> On 17/04/07, Lou Pecora <[EMAIL PROTECTED]>
> wrote:
> > You shoul
vious similar posts
> but could not find
> any. My apologies if this is a repeat or a severly
> dumb question.
>
> Regards,
>
> Simon Berube
>
> ___________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
>
http://projects.s
how numpy arrays operate.
--- Simon Berube <[EMAIL PROTECTED]> wrote:
> Awww, this is quite right. I kept using the a[0][:]
> notation and I
> assume I am simply pulling out single arrays from
> the array "list".
>
> Thank you very much for the prompt reply. (An
in using Python as their numeric language.
NumPy/SciPy would get attention.
Thanks.
-- Lou Pecora, my views are my own.
---
Three laws of thermodynamics:
First law: "You can't win."
Second law: "You can't break even."
Ah, that does ring a bell. Sigh. I need to upgrade
my memory banks. Sure is tough keeping these packages
in sync. Thanks. I'll check it out.
--- Robert Kern <[EMAIL PROTECTED]> wrote:
> Lou Pecora wrote:
>
> > /usr/local/bin/g77 -g -Wall -undefined
> > dy
lled from the superpack at the
http://www.scipy.org/Download site. That seems to
work, giving me version 0.5.3dev for SciPy.
Matplotlib installed fine from tarball and the setup
stuff.
I hope that's of use to someone out there. Each time
I upgrade something it's a
--- Lou Pecora <[EMAIL PROTECTED]> wrote:
> That may be it. I'll get a newer version.
>
No Luck.
I downloaded numpy-1.0-py2.4-macosx10.4.dmg from the
MacOSX package site, but the installer kept telling me
there was nothing to install. I removed the previous
NumPy and n
That may be it. I'll get a newer version.
--- Robert Kern <[EMAIL PROTECTED]> wrote:
> Lou Pecora wrote:
> > After import numpy as N
> >
> > In [10]: print N.__version__
> > 1.1.2881
> >
> > does that look right as a recent version?
>
After import numpy as N
In [10]: print N.__version__
1.1.2881
does that look right as a recent version?
I still get
In [2]: N.append?
Object `N.append` not found.
-- Lou Pecora
My views are my own.
__
Do You Yahoo!?
Tired of spam
(e.g. nansum on same page in
the book). What am I missing?
-- Lou Pecora
My views are my own.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__
t;divide", too.
> lorenzo.
-- Lou Pecora
My views are my own.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
Numpy-discuss
75 matches
Mail list logo