diff options
author | Jarrod Millman <millman@berkeley.edu> | 2008-08-08 04:33:45 +0000 |
---|---|---|
committer | Jarrod Millman <millman@berkeley.edu> | 2008-08-08 04:33:45 +0000 |
commit | 70ed0f238156680efba9b4028810f3aed486357b (patch) | |
tree | e5e0f42e586156ed74128cff0fe84404398b918b /numpy/lib/function_base.py | |
parent | 0da812e06828be6749b1840b48c4f100dc3dfd68 (diff) | |
download | numpy-70ed0f238156680efba9b4028810f3aed486357b.tar.gz |
ran reindent
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 686db237a..75143d70d 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -200,14 +200,14 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, new=None): a : array_like Input data. bins : int or sequence of scalars, optional - If `bins` is an int, it defines the number of equal-width + If `bins` is an int, it defines the number of equal-width bins in the given range (10, by default). If `bins` is a sequence, - it defines the bin edges, including the rightmost edge, allowing + it defines the bin edges, including the rightmost edge, allowing for non-uniform bin widths. range : (float, float), optional The lower and upper range of the bins. If not provided, range is simply ``(a.min(), a.max())``. Values outside the range are - ignored. Note that with `new` set to False, values below + ignored. Note that with `new` set to False, values below the range are ignored, while those above the range are tallied in the rightmost bin. normed : bool, optional @@ -224,10 +224,10 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, new=None): so that the integral of the density over the range remains 1. The `weights` keyword is only available with `new` set to True. new : {None, True, False}, optional - Whether to use the new semantics for histogram: + Whether to use the new semantics for histogram: * None : the new behaviour is used, and a warning is printed, * True : the new behaviour is used and no warning is printed, - * False : the old behaviour is used and a message is printed + * False : the old behaviour is used and a message is printed warning about future deprecation. Returns @@ -264,18 +264,18 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, new=None): # Old behavior if new == False: warnings.warn(""" - The original semantics of histogram is scheduled to be - deprecated in NumPy 1.3. The new semantics fixes + The original semantics of histogram is scheduled to be + deprecated in NumPy 1.3. The new semantics fixes long-standing issues with outliers handling. The main - changes concern - 1. the definition of the bin edges, - now including the rightmost edge, and - 2. the handling of upper outliers, - now ignored rather than tallied in the rightmost bin. - + changes concern + 1. the definition of the bin edges, + now including the rightmost edge, and + 2. the handling of upper outliers, + now ignored rather than tallied in the rightmost bin. + Please read the docstring for more information. """, Warning) - + a = asarray(a).ravel() if (range is not None): @@ -326,19 +326,19 @@ def histogram(a, bins=10, range=None, normed=False, weights=None, new=None): warnings.warn(""" The semantics of histogram has been modified in the current release to fix long-standing issues with - outliers handling. The main changes concern - 1. the definition of the bin edges, - now including the rightmost edge, and + outliers handling. The main changes concern + 1. the definition of the bin edges, + now including the rightmost edge, and 2. the handling of upper outliers, now ignored rather - than tallied in the rightmost bin. - The previous behaviour is still accessible using - `new=False`, but is scheduled to be deprecated in the - next release (1.3). - + than tallied in the rightmost bin. + The previous behaviour is still accessible using + `new=False`, but is scheduled to be deprecated in the + next release (1.3). + *This warning will not printed in the 1.3 release.* - - Use `new=True` to bypass this warning. - + + Use `new=True` to bypass this warning. + Please read the docstring for more information. """, Warning) a = asarray(a) |