Thanks !
-1- The code style is good and the performance vs matlab is good.
With 400x400:
Matlab = 1.56 sec (with nested "for" loop, so no optimization)
Numpy = 0.99 sec (with broadcasting)
-2- Now with the code below I have strange result.
With w=h=400:
- Using "slice"=> 0.99 se
Sorry my previous mail was probalby not clear.
This mail was following the tread we had before, so with some discussion
legacy.
I simplified the code to focus only on "what I" need, rather to bother you
with the full code.
I wrote below a code closer to what I need, where you will agree that
vect
Hi !
Thanks a lot for your fast/detailed reply.
A very good point for Numpy ;-)
I spent all my time trying to prepare my testcase to better share with you,
that's why I didn't reply fast.
I understand the weakness of the missing JITcompiler in Python vs Matlab,
that's why I invistigated numpy ve
Hi,
I need help ;-)
I have here a testcase which works much faster in Matlab than Numpy.
The following code takes less than 0.9sec in Matlab, but 21sec in Python.
Numpy is 24 times slower than Matlab !
The big trouble I have is a large team of people within my company is ready to
replace Matlab
Numpy-discussion] Getting indices from numpy array
withcondition
A Tuesday 18 November 2008, Nicolas ROUX escrigué:
> Hi,
>
> Maybe this is not so clever, but I can't find it in the doc.
> I need to get all indices/index of all occurrences of a value in a
> numpy array
>
>
> As e
: Thursday, October 16, 2008 3:20 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Missing numpy.i
2008/10/16 Nicolas ROUX <[EMAIL PROTECTED]>:
> Thanks for your reply ;-)
>
> In fact, I was talking about the 1.20 release installer, which is not
> including th
Hi,
Maybe this is not so clever, but I can't find it in the doc.
I need to get all indices/index of all occurrences of a value in a numpy
array
As example:
a = numpy.array([1,2,3],[4,5,6],[7,8,9])
I need to get the indice/index of all array elements where a[a>3]
Any fast/easy way to write this
Hi,
Me again ;-)
I have now a new question to ask (I hope not too silly).
How to do :
for j in range(yHeight):
for i in range(xWidth):
x[j,i] = y[k,i] with k = numpy.mod(i+sj,yHeight)
With efficient numpy code, without the double "for" ?
Thanks,
Cheers,
Nicolas.
-Original Me
Thanks for all of you,
for this fast and good reply ;-)
Nicolas.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Douard
Sent: Monday, October 27, 2008 12:51 PM
To: numpy-discussion@scipy.org
Subject: Re: [Numpy-discussion] How to do: y[y Hello,
>
>
Hello,
I hope this is not a silly question ;-)
I have a Numpy array, and I want to process it with :
"if the value is lower than Threshold, then increase by Threshold"
I would like to translate it as:
y[yhttp://projects.scipy.org/mailman/listinfo/numpy-discussion
automatically ?
Cheers,
Nicolas.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stefan van der Walt
Sent: Thursday, October 16, 2008 3:06 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] Missing numpy.i
2008/10/16 Nicolas ROUX <[EM
Hello,
Under windows, using the latest numpy 1.20 and Swig release, I can't find
anymore the numpy.i file.
I used to find it in numpy/doc/ in the release 1.04.
I tried to look some info the web without any success.
Thanks for you help,
Cheers,
Nicolas.
___
12 matches
Mail list logo