[SciPy-Dev] Patch for scipy/signal/windows.py

Nils Wagner nils106 at googlemail.com
Mon Feb 4 15:53:00 EST 2013


Running

scipy.test()

results in several errors of the form

 ERROR: iterating a structure 2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File
"/home/nwagner/local/lib64/python2.7/site-packages/scipy/ndimage/tests/test_ndimage.py",
line 3063, in test_iterate_structure02
    out = ndimage.iterate_structure(struct, 2)
  File
"/home/nwagner/local/lib64/python2.7/site-packages/scipy/ndimage/morphology.py",
line 118, in iterate_structure
    out[slc] = structure != 0
DeprecationWarning: non-integer slice parameter. In a future numpy release,
this will raise an error.

======================================================================
ERROR: test_cases (test_solvers.TestSolveDiscreteARE)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/nwagner/local/lib64/python2.7/site-packages/scipy/linalg/tests/test_solvers.py",
line 129, in test_cases
    self.check_case(case[0], case[1], case[2], case[3])
  File
"/home/nwagner/local/lib64/python2.7/site-packages/scipy/linalg/tests/test_solvers.py",
line 123, in check_case
    x = solve_discrete_are(a, b, q, r)
  File
"/home/nwagner/local/lib64/python2.7/site-packages/scipy/linalg/_solvers.py",
line 272, in solve_discrete_are
    u11 = u[0:m/2, 0:n/2]
DeprecationWarning: non-integer slice parameter. In a future numpy release,
this will raise an error.


Cheers
             Nils


On Mon, Feb 4, 2013 at 8:47 PM, Warren Weckesser <warren.weckesser at gmail.com
> wrote:

> Thanks Nils.  I took a look at the patch.  It might be simpler to just put
> `M = int(M)` at the beginning of the function, and (now that the latest
> version of the file in the master branch imports division from
> __future__),  change any divisions that look like they expected integer
> arguments from `/` to `//`.
>
> Could you explain the problem that motivated you to create the patch?  It
> might help provide a useful unit test.
>
> Warren
>
>
>
> On Mon, Feb 4, 2013 at 3:11 PM, Nils Wagner <nils106 at googlemail.com>wrote:
>
>>
>>
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
>>
>>
>
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20130204/60abb26b/attachment.html>


More information about the SciPy-Dev mailing list