summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkritisingh1 <kritisingh1.ks@gmail.com>2019-07-06 18:08:53 +0530
committerkritisingh1 <kritisingh1.ks@gmail.com>2019-07-06 23:38:00 +0530
commit02b49b42baadbe70f6c98ad7ec37c02683a1698f (patch)
tree08b1190acdcb4cbb84157ed53f5cc55266be864d
parente145a74857a20e278bcb6e53f29080f1e073e4cd (diff)
downloadnumpy-02b49b42baadbe70f6c98ad7ec37c02683a1698f.tar.gz
Removes duplicated docs for python functions
-rw-r--r--doc/source/reference/routines.other.rst3
-rw-r--r--numpy/core/_add_newdocs.py240
2 files changed, 2 insertions, 241 deletions
diff --git a/doc/source/reference/routines.other.rst b/doc/source/reference/routines.other.rst
index 5bd5835f6..28c9a1ad1 100644
--- a/doc/source/reference/routines.other.rst
+++ b/doc/source/reference/routines.other.rst
@@ -52,4 +52,5 @@ Matlab-like Functions
.. autosummary::
:toctree: generated/
- who \ No newline at end of file
+ who
+ disp \ No newline at end of file
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index 39974bb0b..584250785 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -3255,122 +3255,6 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('min',
"""))
-add_newdoc('numpy.core.multiarray', 'shares_memory',
- """
- shares_memory(a, b, max_work=None)
-
- Determine if two arrays share memory
-
- Parameters
- ----------
- a, b : ndarray
- Input arrays
- max_work : int, optional
- Effort to spend on solving the overlap problem (maximum number
- of candidate solutions to consider). The following special
- values are recognized:
-
- max_work=MAY_SHARE_EXACT (default)
- The problem is solved exactly. In this case, the function returns
- True only if there is an element shared between the arrays.
- max_work=MAY_SHARE_BOUNDS
- Only the memory bounds of a and b are checked.
-
- Raises
- ------
- numpy.TooHardError
- Exceeded max_work.
-
- Returns
- -------
- out : bool
-
- See Also
- --------
- may_share_memory
-
- Examples
- --------
- >>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))
- False
-
- """)
-
-
-add_newdoc('numpy.core.multiarray', 'may_share_memory',
- """
- may_share_memory(a, b, max_work=None)
-
- Determine if two arrays might share memory
-
- A return of True does not necessarily mean that the two arrays
- share any element. It just means that they *might*.
-
- Only the memory bounds of a and b are checked by default.
-
- Parameters
- ----------
- a, b : ndarray
- Input arrays
- max_work : int, optional
- Effort to spend on solving the overlap problem. See
- `shares_memory` for details. Default for ``may_share_memory``
- is to do a bounds check.
-
- Returns
- -------
- out : bool
-
- See Also
- --------
- shares_memory
-
- Examples
- --------
- >>> np.may_share_memory(np.array([1,2]), np.array([5,8,9]))
- False
- >>> x = np.zeros([3, 4])
- >>> np.may_share_memory(x[:,0], x[:,1])
- True
-
- """)
-
-
-add_newdoc('numpy.lib.utils', 'byte_bounds',
- """
- byte_bounds(a)
-
- Returns pointers to the end-points of an array in the form of tuple
- of two integers. The first integer is the first byte of the array,
- the second integer is just past the last byte of the array.
-
- If `a` is not contiguous it will not use every byte between the
- returned integer values.
-
- Parameters
- ----------
- a : ndarray
- Input array. It must conform to the Python-side of the array
- interface.
-
- Returns
- -------
- (low, high) : tuple of 2 integers
-
- Examples
- --------
- >>> x = np.array([1,2,4])
- >>> np.byte_bounds(x)
- (32030368, 32030392)
- >>> I = np.eye(2, dtype='f'); I.dtype
- dtype('float32')
- >>> low, high = np.byte_bounds(I)
- >>> high - low == I.size*I.itemsize
- True
-
- """)
-
-
add_newdoc('numpy.core.multiarray', 'ndarray', ('newbyteorder',
"""
arr.newbyteorder(new_order='S')
@@ -4383,53 +4267,6 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('view',
[(4, 5)]], dtype=[('width', '<i2'), ('length', '<i2')])
"""))
-add_newdoc('numpy.lib.utils', 'who',
- """
- who(verdict=None)
-
- Print the NumPy arrays in the given dictionary.
-
- If there is no dictionary passed in or `vardict` is None then returns
- NumPy arrays in the globals() dictionary (all NumPy arrays in the
- namespace).
-
- Parameters
- ----------
- vardict : dict, optional
- A dictionary possibly containing ndarrays. Default is globals().
-
- Returns
- -------
- out : None
- Returns 'None'.
-
- Notes
- -----
- Prints out the name, shape, bytes and type of all of the ndarrays
- present in `vardict`.
-
- Examples
- --------
- >>> a = np.arange(10)
- >>> b = np.ones(20)
- >>> np.who()
- Name Shape Bytes Type
- ===========================================================
- a 10 80 int64
- b 20 160 float64
- Upper bound on total bytes = 240
-
- >>> d = {'x': np.arange(2.0), 'y': np.arange(3.0), 'txt': 'Some str',
- ... 'idx':5}
- >>> np.who(d)
- Name Shape Bytes Type
- ===========================================================
- x 2 16 float64
- y 3 24 float64
- Upper bound on total bytes = 40
-
- """)
-
##############################################################################
#
@@ -7080,80 +6917,3 @@ for float_name in ('half', 'single', 'double', 'longdouble'):
(-1, 4)
""".format(ftype=float_name)))
-##############################################################################
-#
-# Miscellaneous utility routines
-#
-##############################################################################
-
-add_newdoc('numpy.lib.utils', 'get_include',
- """
-
- Parameters
- ----------
- None
-
- Returns
- -------
- Directory that contains the NumPy \\*.h header files.
-
- Extension modules that need to compile against NumPy should use this
- function to locate the appropriate include directory.
-
- """)
-
-add_newdoc('numpy.lib.utils', 'deprecate',
- """
-
- deprecate(func, old_name, new_name, message)
-
- Parameters
- ----------
- func : function
- The function to be deprecated.
- old_name : str, optional
- The name of the function to be deprecated. Default is None, in
- which case the name of `func` is used.
- new_name : str, optional
- The new name for the function. Default is None, in which case the
- deprecation message is that `old_name` is deprecated. If given, the
- deprecation message is that `old_name` is deprecated and `new_name`
- should be used instead.
- message : str, optional
- Additional explanation of the deprecation. Displayed in the
- docstring after the warning.
-
- Returns
- -------
- old_func : function
- The deprecated function.
-
- Examples
- --------
- Note that ``olduint`` returns a value after printing Deprecation
- Warning:
-
- >>> olduint = np.deprecate(np.uint)
- DeprecationWarning: `uint64` is deprecated! # may vary
- >>> olduint(6)
- 6
-
- Notes
- -----
- Deprecate may be run as a function or as a decorator
- If run as a function, we initialise the decorator class
- and execute its __call__ method.
-
- """)
-
-add_newdoc('numpy.lib.utils', 'deprecate_with_doc',
- """
-
- Lambda function which calls the ``_Deprecate`` with a predefined
- message.
-
- Parameters
- ----------
- message : str
-
- """)