[Scipy-tickets] [SciPy] #876: scipy.spatial.distance.sokalsneath raises a ZeroDivisionError

SciPy scipy-tickets@scipy....
Thu Feb 26 07:14:47 CST 2009


#876: scipy.spatial.distance.sokalsneath raises a ZeroDivisionError
---------------------------+------------------------------------------------
 Reporter:  jpaalasm       |       Owner:  peridot       
     Type:  defect         |      Status:  new           
 Priority:  normal         |   Milestone:  0.8.0         
Component:  scipy.spatial  |     Version:  devel         
 Severity:  normal         |    Keywords:  version: 0.7.0
---------------------------+------------------------------------------------
 {{{
 In [107]: scipy.spatial.distance.sokalsneath((False, False), (False,
 False))
 ---------------------------------------------------------------------------
 ZeroDivisionError                         Traceback (most recent call
 last)

 /home/jpaalasm/<ipython console> in <module>()

 /usr/lib/python2.5/site-packages/scipy/spatial/distance.pyc in
 sokalsneath(u, v)
     825         ntt = (u * v).sum()
     826     (nft, ntf) = _nbool_correspond_ft_tf(u, v)
 --> 827     return float(2.0 * (ntf + nft))/float(ntt + 2.0 * (ntf + nft))
     828
     829

 ZeroDivisionError: float division

 }}}

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


More information about the Scipy-tickets mailing list