THX for help and all answers. Code:
for i in range(len(myinput)-m+1):
cin=tempmatr[:]
ctmp=tempmatr[i]
xtmp=((numpy.abs(cin-ctmp))<=r)*1
x2tmp=numpy.sum(numpy.transpose(xtmp), axis=0)
mcount=numpy.sum((x2tmp==m)*1)
allcount=allcount+mcount
works ju
Sorry, I made a typo!
On Wednesday 11 July 2007 17:32, Eike Welk wrote:
> On Wednesday 11 July 2007 12:52, Michał Szpadzik wrote:
> > I would like to know how change this True/False to 1/0
>
> To convert an array of bool to an array double, you can use the
> function numpy.doube( ... ). The functi
On Wednesday 11 July 2007 12:52, Michał Szpadzik wrote:
> I would like to know how change this True/False to 1/0
To convert an array of bool to an array double, you can use the
function numpy.doube( ... ). The function numpy.int32( ... ) converts
to integers.
Regards,
Eike.
___
On 7/11/07, Michał Szpadzik <[EMAIL PROTECTED]> wrote:
> I would like to know how change this True/False to 1/0
Multiplying by 1 changes the True/False to 1/0. But sum gives the same
result for True/False as it does for 1/0. So maybe you don't need to
convert from True/False to 1/0?
__
Some time ago I wrote small lib for signal processing. Now I'm trying to
convert it from numarray to numpy, and I've problem:
Code in numarray:
for i in range(len(myinput)-m+1):
cin=tempmatr[:]
ctmp=tempmatr[i]
xtmp=(numarray.abs(cin-ctmp))<=r
x2tmp=numarray.sum(n