Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removing Bio.distance (deprecated in Biopython 1.49)

  • Loading branch information...
commit 0c625208d741e1bc57ef494b3f47c64dad39008b 1 parent 69f1dcc
@peterjc peterjc authored
Showing with 1 addition and 36 deletions.
  1. +0 −35 Bio/distance.py
  2. +1 −1  DEPRECATED
View
35 Bio/distance.py
@@ -1,35 +0,0 @@
-"""
-This module provides code for various distance measures.
-
-Functions:
-euclidean Euclidean distance between two points
-euclidean_py Pure Python implementation of euclidean.
-
-"""
-# XXX cosine distance
-
-import warnings
-warnings.warn("Bio.distance is deprecated. If you use this module, please notify the Biopython developers at biopython-dev@biopython.org", DeprecationWarning)
-
-from numpy import *
-
-def euclidean(x, y):
- """euclidean(x, y) -> euclidean distance between x and y"""
- if len(x) != len(y):
- raise ValueError("vectors must be same length")
- #return sqrt(sum((x-y)**2))
- # Optimization by John Corradi (JCorradi@msn.com)
- d = x-y
- return sqrt(dot(d, d))
-
-def euclidean_py(x, y):
- """euclidean_py(x, y) -> euclidean distance between x and y"""
- # lightly modified from implementation by Thomas Sicheritz-Ponten.
- # This works faster than the Numeric implementation on shorter
- # vectors.
- if len(x) != len(y):
- raise ValueError("vectors must be same length")
- sum = 0
- for i in range(len(x)):
- sum += (x[i]-y[i])**2
- return sqrt(sum)
View
2  DEPRECATED
@@ -90,7 +90,7 @@ Bio.distance (and Bio.cdistance)
================================
Bio.distance was deprecated in Release 1.49, at which point its C code
implementation Bio.cdistance was removed (this was not intended as a public
-API).
+API). Removed in Release 1.53.
Bio.Ndb
=======
Please sign in to comment.
Something went wrong with that request. Please try again.