summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorcookedm <cookedm@localhost>2006-07-18 21:10:39 +0000
committercookedm <cookedm@localhost>2006-07-18 21:10:39 +0000
commitd5a13c5e4d881a205bef6ce64cb2222aef98d43c (patch)
treeb57b99aa0d926ced857f526fd0ab0472be811da4 /numpy/lib/function_base.py
parentba41f2f5d864551b4462a9f53e8f23f626b11105 (diff)
downloadnumpy-d5a13c5e4d881a205bef6ce64cb2222aef98d43c.tar.gz
add some more docstrings
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 3143c8846..44c31b8ec 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -64,6 +64,23 @@ def iterable(y):
return 1
def histogram(a, bins=10, range=None, normed=False):
+ """histogram(sample, bins = 10, range = None, normed = False) -> H, ledges
+
+ Return the distribution of a sample.
+
+ Parameters
+ ----------
+ bins: Number of bins
+ range: Lower and upper bin edges (default: [sample.min(), sample.max()]).
+ Does not really work, all values greater than range are stored in
+ the last bin.
+ normed: If False (default), return the number of samples in each bin.
+ If True, return a frequency distribution.
+
+ Output
+ ------
+ histogram array, left bin edges array.
+ """
a = asarray(a).ravel()
if not iterable(bins):
if range is None: