summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_function_base.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-09-15 22:58:26 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-09-15 22:58:26 +0000
commitf74f1d14f0768650a7dd5327944ddcc82f0d892d (patch)
treec77d70405fe39997a650dcb0be3694be85fcede9 /numpy/lib/tests/test_function_base.py
parent972ae975594790108be7bd3661d0d0be007e048c (diff)
downloadnumpy-f74f1d14f0768650a7dd5327944ddcc82f0d892d.tar.gz
Rename to histogramdd as original author said.
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r--numpy/lib/tests/test_function_base.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index a8ccf5eaa..b1d5ec450 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -353,24 +353,24 @@ class test_histogram(NumpyTestCase):
(a,b)=histogram(linspace(0,10,100))
assert(all(a==10))
-class test_histogramnd(NumpyTestCase):
+class test_histogramdd(NumpyTestCase):
def check_simple(self):
x = array([[-.5, .5, 1.5], [-.5, 1.5, 2.5], [-.5, 2.5, .5], \
[.5, .5, 1.5], [.5, 1.5, 2.5], [.5, 2.5, 2.5]])
- H, edges = histogramnd(x, (2,3,3), range = [[-1,1], [0,3], [0,3]])
+ H, edges = histogramdd(x, (2,3,3), range = [[-1,1], [0,3], [0,3]])
answer = asarray([[[0,1,0], [0,0,1], [1,0,0]], [[0,1,0], [0,0,1], [0,0,1]]])
assert(all(H == answer))
# Check normalization
ed = [[-2,0,2], [0,1,2,3], [0,1,2,3]]
- H, edges = histogramnd(x, bins = ed, normed = True)
+ H, edges = histogramdd(x, bins = ed, normed = True)
assert(all(H == answer/12.))
# Check that H has the correct shape.
- H, edges = histogramnd(x, (2,3,4), range = [[-1,1], [0,3], [0,4]], normed=True)
+ H, edges = histogramdd(x, (2,3,4), range = [[-1,1], [0,3], [0,4]], normed=True)
answer = asarray([[[0,1,0,0], [0,0,1,0], [1,0,0,0]], [[0,1,0,0], [0,0,1,0], [0,0,1,0]]])
assert_array_almost_equal(H, answer/6., 4)
# Check that a sequence of arrays is accepted and H has the correct shape.
z = [squeeze(y) for y in split(x,3,axis=1)]
- H, edges = histogramnd(z, bins=(4,3,2),range=[[-2,2], [0,3], [0,2]])
+ H, edges = histogramdd(z, bins=(4,3,2),range=[[-2,2], [0,3], [0,2]])
answer = asarray([[[0,0],[0,0],[0,0]],
[[0,1], [0,0], [1,0]],
[[0,1], [0,0],[0,0]],