[Scipy-tickets] [SciPy] #1255: faulty logic in spatial.distance.squareform

SciPy Trac scipy-tickets@scipy....
Fri Feb 4 18:48:08 CST 2011


#1255: faulty logic in spatial.distance.squareform
---------------------------+------------------------------------------------
 Reporter:  muellner       |       Owner:  peridot     
     Type:  defect         |      Status:  needs_review
 Priority:  normal         |   Milestone:  0.9.0       
Component:  scipy.spatial  |     Version:  0.7.0       
 Keywords:                 |  
---------------------------+------------------------------------------------

Comment(by warren.weckesser):

 This is the behavior in scipy trunk (revision 7123):
 {{{
 In [1]: from scipy.spatial.distance import squareform

 In [2]: a = array([[0,1,2],[1,0,3],[2,3,0]])

 In [3]: b = squareform(a)

 In [4]: b
 Out[4]: array([ 1.,  2.,  3.])

 In [5]: b = squareform(a, force='tovector')

 In [6]: b
 Out[6]: array([ 1.,  2.,  3.])
 }}}
 Is this now the correct behavior?  It looks fine to me, but I'm not
 familiar with the MATLAB function.

 Can we close this ticket?

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


More information about the Scipy-tickets mailing list