[SciPy-Dev] int division in signaltools.py

Benjamin Root ben.root at ou.edu
Thu Jul 15 16:31:37 EDT 2010


Hi,

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,
though.

Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.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: 2295 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100715/7fd34f04/attachment.obj>


More information about the SciPy-Dev mailing list