diff options
author | Chris Jordan-Squire <cjordan1@uw.edu> | 2011-08-05 10:43:51 -0500 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-29 20:19:04 -0600 |
commit | 180750b9a4a4dc46be32ed6d738329b2ab97abfa (patch) | |
tree | 331bb2eb603587c694ba50ae7d431eb2678bf274 /numpy/lib/function_base.py | |
parent | d91521e5fd858726998146e6055f677cc3aeb011 (diff) | |
download | numpy-180750b9a4a4dc46be32ed6d738329b2ab97abfa.tar.gz |
ENH: Add function for adding docstrings to ufuncs.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index b269d98a1..f254bbacf 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -6,7 +6,7 @@ __all__ = ['select', 'piecewise', 'trim_zeros', 'copy', 'iterable', 'histogram', 'histogramdd', 'bincount', 'digitize', 'cov', 'corrcoef', 'msort', 'median', 'sinc', 'hamming', 'hanning', 'bartlett', 'blackman', 'kaiser', 'trapz', 'i0', 'add_newdoc', 'add_docstring', - 'meshgrid', 'delete', 'insert', 'append', 'interp'] + 'meshgrid', 'delete', 'insert', 'append', 'interp', 'add_newdoc_ufunc'] import warnings import types @@ -27,6 +27,7 @@ from _compiled_base import _insert, add_docstring from _compiled_base import digitize, bincount, interp as compiled_interp from arraysetops import setdiff1d from utils import deprecate +from _compiled_base import add_newdoc_ufunc import numpy as np @@ -3179,6 +3180,11 @@ def add_newdoc(place, obj, doc): (method2, docstring2), ...] This routine never raises an error. + + This routine cannot modify read-only docstrings, as appear + in new-style classes or built-in functions. Because this + routine never raises an error the caller must check manually + that the docstrings were changed. """ try: new = {} |