diff options
author | Uddeshya Singh <singhuddeshyaofficial@gmail.com> | 2018-07-13 19:52:44 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-13 19:52:44 +0530 |
commit | 1f41265ddac77a66e2bf735ce970952d0f067122 (patch) | |
tree | 4796e3732d0f99fa455a5cd3f8c48ad6e2c4c8cb /numpy/lib/function_base.py | |
parent | 4862c1333e8b51a409659ada3496ae1ee3675df9 (diff) | |
download | numpy-1f41265ddac77a66e2bf735ce970952d0f067122.tar.gz |
Update function_base.py
* fixed grammatical mistakes
* added a space before Example
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 03024db3c..42aee22b7 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -310,10 +310,10 @@ def average(a, axis=None, weights=None, returned=False): of the weights as the second element. `sum_of_weights` is of the same type as `average`. The result dtype follows a genereal pattern. If `weights` is None, the result dtype will be that of `a` , or `float64` - if `a` is integral. Otherwise, if `weights` is not None and `a` is non + if `a` is integral. Otherwise, if `weights` is not None and `a` is non- integral, the result type will be the type of lowest precision capable of - representing values of both `a` and `weights` but if `a` happens to be - integral, the previous rules still applies but the result dtype would + representing values of both `a` and `weights`. If `a` happens to be + integral, the previous rules still applies but the result dtype will at least be `float64`. Raises @@ -332,7 +332,8 @@ def average(a, axis=None, weights=None, returned=False): ma.average : average for masked arrays -- useful if your data contains "missing" values numpy.result_type : Returns the type that results from applying the - NumPy type promotion rules to the arguments. + numpy type promotion rules to the arguments. + Examples -------- >>> data = range(1,5) |