One operator which could be used is '%'. We could keep the current
behaviour for ARRAY%SCALAR but have ARRAY%ARRAY as being matrix
multiplication. It has the same precedence as *,/.
James
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
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[yTreshold] = y + Treshold
To benefit from the Numpy speed.
But this doesn't work, any idea
On Mon, Oct 27, 2008 at 12:41:06PM +0100, Nicolas ROUX wrote:
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[yTreshold] = y +
Nicolas ROUX schrieb:
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[yTreshold] = y + Treshold
Hi,
your solution does not work,
On Mon, Oct 27, 2008 at 12:45:44PM +0100, Uwe Schmitt wrote:
Nicolas ROUX schrieb:
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
Le Monday 27 October 2008 12:41:06 Nicolas ROUX, vous avez écrit :
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[yTreshold] = y +
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[yT] = y+T
On 27-Oct-08, at 7:22 AM, James Philbin wrote:
One operator which could be used is '%'. We could keep the current
behaviour for ARRAY%SCALAR but have ARRAY%ARRAY as being matrix
multiplication. It has the same precedence as *,/.
The problem is that it would monkey with existing semantics for
If what you are trying to do is actually ensure all data is within the
range [a,b], you may be interested to know that python's % operator
works on floating-point numbers:
In [1]: -0.1 % 1
Out[1]: 0.90002
So if you want all samples in the range (0,1) you can just do y%=1.
Anne
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
We wrote a simple variation on the gradient() function to calculate the
second derivatives. Would there be any interest in including a
gradient2() in numpy?
Andrew
def gradient2(f, *varargs):
Calculate the second-order gradient of an N-dimensional scalar
function.
Uses central
James Philbin wrote:
One operator which could be used is '%'. We could keep the current
behaviour for ARRAY%SCALAR but have ARRAY%ARRAY as being matrix
multiplication. It has the same precedence as *,/.
No, having completely unrelated meanings for the same operator symbol
sounds like a
On Mon, Oct 27, 2008 at 11:31 AM, Eric Firing [EMAIL PROTECTED] wrote:
James Philbin wrote:
One operator which could be used is '%'. We could keep the current
behaviour for ARRAY%SCALAR but have ARRAY%ARRAY as being matrix
multiplication. It has the same precedence as *,/.
No, having
Hi,
I made some changes to the ParallelProgramming wiki page to outline
use of the (multi)processing module as well as the threading module.
I'm very much not an expert on this - just researched it for myself,
so please feel free to correct/ extend/ delete as appropriate.
Robin
Hello list -
I can multiply a poly1d instance with a number, but when I multiply with a
number from an array, the order matters. That seems a bug:
a = array([2])
p = poly1d([1,2])
print 2*p # Works
2 x + 4
print a[0]*p # Doesn't work, returns an array
[2 4]
print p*a[0] # Works
2 x + 4
On Monday 27 October 2008 12:56:56 Robin wrote:
Hi,
I made some changes to the ParallelProgramming wiki page to outline
use of the (multi)processing module as well as the threading module.
I'm very much not an expert on this - just researched it for myself,
so please feel free to correct/
On Mon, Oct 27, 2008 at 15:20, Sebastien Binet
[EMAIL PROTECTED] wrote:
On Monday 27 October 2008 12:56:56 Robin wrote:
Hi,
I made some changes to the ParallelProgramming wiki page to outline
use of the (multi)processing module as well as the threading module.
I'm very much not an expert on
On Monday 27 October 2008 16:54:09 Erik Tollerud wrote:
Is there any straightforward way of notifying on change of a numpy
array that leaves the numpy arrays still efficient?
Erik, may be you could try the trick presented here :
http://www.scipy.org/Subclasses
in the __array_wrap__ section.
On Mon, Oct 27, 2008 at 1:56 PM, Robert Kern [EMAIL PROTECTED] wrote:
On Mon, Oct 27, 2008 at 15:54, Erik Tollerud [EMAIL PROTECTED] wrote:
Is there any straightforward way of notifying on change of a numpy
array that leaves the numpy arrays still efficient?
Not currently, no.
--
Robert
Did you mean this one
http://www.netlib.org/scalapack/pblas_qref.html
?
As for the ParallelProgramming wiki page, there are some words in
section Use parallel primitives about numpy.dot still I can't
understand from the section: if I get numpy from sources and compile it
(via python setup.py
On Mon, Oct 27, 2008 at 9:17 PM, dmitrey [EMAIL PROTECTED] wrote:
As for the ParallelProgramming wiki page, there are some words in
section Use parallel primitives about numpy.dot still I can't
understand from the section: if I get numpy from sources and compile it
(via python setup.py build)
Brent Pedersen wrote:
On Mon, Oct 27, 2008 at 1:56 PM, Robert Kern [EMAIL PROTECTED] wrote:
On Mon, Oct 27, 2008 at 15:54, Erik Tollerud [EMAIL PROTECTED] wrote:
Is there any straightforward way of notifying on change of a numpy
array that leaves the numpy arrays still efficient?
Not
22 matches
Mail list logo