diff options
author | cookedm <cookedm@localhost> | 2006-07-18 21:10:39 +0000 |
---|---|---|
committer | cookedm <cookedm@localhost> | 2006-07-18 21:10:39 +0000 |
commit | d5a13c5e4d881a205bef6ce64cb2222aef98d43c (patch) | |
tree | b57b99aa0d926ced857f526fd0ab0472be811da4 /numpy/lib/function_base.py | |
parent | ba41f2f5d864551b4462a9f53e8f23f626b11105 (diff) | |
download | numpy-d5a13c5e4d881a205bef6ce64cb2222aef98d43c.tar.gz |
add some more docstrings
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 17 |
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: |