Permalink
Browse files

DOC Add See also for bn.nn <==> bn.ss

  • Loading branch information...
1 parent e97df3d commit 1671657f0591e89faee433888a3e34d44b9668be @kwgoodman committed May 18, 2012
Showing with 9 additions and 3 deletions.
  1. +4 −2 bottleneck/src/template/func/nn.py
  2. +5 −1 bottleneck/src/template/func/ss.py
@@ -111,6 +111,10 @@ def nn(arr, arr0, int axis=1):
Index of nearest neighbor in `arr`. If all distances are NaN
then the index returned is zero.
+ See also
+ --------
+ bottleneck.ss: Sum of squares along specified axis.
+
Notes
-----
A brute force algorithm is used to find the nearest neighbor.
@@ -122,8 +126,6 @@ def nn(arr, arr0, int axis=1):
the same array `arr` to find nearest neighbors with different
`arr0`. That is because it takes time to set up SciPy's cKDTree.
- If `arr` fits into your memory's cache then bn.nn() is fast.
-
Examples
--------
Create the input arrays:
@@ -127,7 +127,11 @@ def ss(arr, axis=0):
-------
y : ndarray
The sum of a**2 along the given axis.
-
+
+ See also
+ --------
+ bottleneck.nn: Nearest neighbor.
+
Examples
--------
>>> a = np.array([1., 2., 5.])

0 comments on commit 1671657

Please sign in to comment.