[Scipy-tickets] [SciPy] #1146: Code problems in scipy.spatial.distance

SciPy Trac scipy-tickets@scipy....
Fri Apr 2 18:09:03 CDT 2010

#1146: Code problems in scipy.spatial.distance
 Reporter:  warren.weckesser  |       Owner:  peridot
     Type:  defect            |      Status:  new    
 Priority:  normal            |   Milestone:  0.8.0  
Component:  scipy.spatial     |     Version:  0.7.0  
 Keywords:                    |  
 Running pyflakes on distance.py in scipy/spatial:
 none:spatial warren$ pyflakes distance.py
 distance.py:140: 'types' imported but unused
 distance.py:149: undefined name 'array'
 distance.py:598: local variable 'nff' is assigned to but never used
 distance.py:601: local variable 'ntt' is assigned to but never used
 distance.py:1088: undefined name 'w'
 distance.py:1135: undefined name 'w'
 distance.py:1233: undefined name 'w'
 distance.py:1456: undefined name '_warning'
 distance.py:1516: undefined name '_warning'
 The unused import and the undefined name 'array' are easily fixed, but
 running the test suite doesn't result in an error, which means that the
 code where 'array' is used instead of 'np.array' is never run in a test.
 Perhaps someone familiar with this code could add another test or two that
 would catch the error.

 I haven't looked at the code enough to know if the undefined names 'w' and
 '_warning' are easily fixed. The fix should also include tests that would
 execute the code where these occur.

Ticket URL: <http://projects.scipy.org/scipy/ticket/1146>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list