# [Numpy-svn] r3081 - tags/1.0b4/numpy/lib

numpy-svn at scipy.org numpy-svn at scipy.org
Sun Aug 27 03:02:22 CDT 2006

Author: oliphant
Date: 2006-08-27 03:02:19 -0500 (Sun, 27 Aug 2006)
New Revision: 3081

Modified:
tags/1.0b4/numpy/lib/function_base.py
Log:

Modified: tags/1.0b4/numpy/lib/function_base.py
===================================================================
--- tags/1.0b4/numpy/lib/function_base.py	2006-08-27 07:43:37 UTC (rev 3080)
+++ tags/1.0b4/numpy/lib/function_base.py	2006-08-27 08:02:19 UTC (rev 3081)
@@ -1,4 +1,4 @@
-__all__ = ['logspace', 'linspace',
+u__all__ = ['logspace', 'linspace',
'select', 'piecewise', 'trim_zeros',
'copy', 'iterable', #'base_repr', 'binary_repr',
'diff', 'gradient', 'angle', 'unwrap', 'sort_complex', 'disp',
@@ -7,7 +7,7 @@
'histogram', 'bincount', 'digitize', 'cov', 'corrcoef', 'msort',
'median', 'sinc', 'hamming', 'hanning', 'bartlett', 'blackman',
-           'delete', 'insert', 'append'
+           'delete', 'insert', 'append', 'tensordot'
]

import types
@@ -1215,3 +1215,12 @@
values = ravel(values)
axis = arr.ndim-1
return concatenate((arr, values), axis=axis)
+
+def tensordot(arr1, arr2, axes1=-1, axes2=0):
+    """tensordot returns the product for any (ndim >= 1) arrays.
+
+    r_{xxx, yyy} = \sum_k arr1_{xxx,k} arr2_{k,yyy} where
+    the axes of k
+    """
+    #FIXME
+    pass