[SciPy-Dev] int division in signaltools.py

Benjamin Root ben.root@ou....
Thu Jul 15 15:31:37 CDT 2010


I was peeking through signaltools.py today, and I noticed several spots
where integer division was being intended, but not explicitly done with
'//'.  While most of the cases seem pretty benign, there were a couple of
spots where unverified input was being used for the division.  I am
including a patch for all the spots I believe integer division was
intended.  This change does not appear to effect the nose test, but I am
still weary of whatever implications there are with this change.

Also, as a side note, I noticed that the hilbert2() function has a double
call to "x = asarray(x)".  This is *not* covered by the attached patch,

Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20100715/7fd34f04/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intdiv.patch
Type: application/octet-stream
Size: 2294 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-dev/attachments/20100715/7fd34f04/attachment.obj 

More information about the SciPy-Dev mailing list