summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorTyler Reddy <tyler.je.reddy@gmail.com>2018-12-05 11:15:28 -0800
committerTyler Reddy <tyler.je.reddy@gmail.com>2018-12-14 10:14:05 -0800
commit0bdc587d6cf5e6806e95d9debcafe62ac9f1d7fa (patch)
tree1fa53cdf16bdc6eeb2dcc3eec429b6d5cbef5c2b /numpy
parent5eae94f603b9f087c1f0bbc8e1f8fc9f773456d8 (diff)
downloadnumpy-0bdc587d6cf5e6806e95d9debcafe62ac9f1d7fa.tar.gz
MAINT: addressing review comments
* restored regression comment in numpy/core/defchararray.py * fixed the dimensionality of the z array in all() docstring in numpy/core/fromnumeric.py; this isn't detected because it is in-line with variable memory addresses which are tagged as variable for refguide * byte_bounds() docstring adjusted to reflect non-variable dtype after reviewer requested removal of complex dtype * restore an original comment in matmul docstring, as requested by reviewer
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/code_generators/ufunc_docstrings.py1
-rw-r--r--numpy/core/defchararray.py2
-rw-r--r--numpy/core/fromnumeric.py2
-rw-r--r--numpy/lib/utils.py2
4 files changed, 4 insertions, 3 deletions
diff --git a/numpy/core/code_generators/ufunc_docstrings.py b/numpy/core/code_generators/ufunc_docstrings.py
index 236c35f9b..6843858d9 100644
--- a/numpy/core/code_generators/ufunc_docstrings.py
+++ b/numpy/core/code_generators/ufunc_docstrings.py
@@ -2609,6 +2609,7 @@ add_newdoc('numpy.core.umath', 'matmul',
(9, 5, 7, 9, 5, 4)
>>> np.matmul(a, c).shape # doctest: +SKIP
(9, 5, 7, 4)
+ >>> # n is 5, k is 3, m is 4
The matmul function implements the semantics of the `@` operator introduced
in Python 3.5 following PEP465.
diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py
index eeba5da8f..007fc6186 100644
--- a/numpy/core/defchararray.py
+++ b/numpy/core/defchararray.py
@@ -1090,7 +1090,7 @@ def lstrip(a, chars=None):
>>> np.char.lstrip(c, 'A') # leaves c unchanged
array(['aAaAaA', ' aA ', 'abBABba'], dtype='<U7')
>>> (np.char.lstrip(c, ' ') == np.char.lstrip(c, '')).all()
- ... # This used to return True
+ ... # XXX: is this a regression? This used to return True
... # np.char.lstrip(c,'') does not modify c at all.
False
>>> (np.char.lstrip(c, ' ') == np.char.lstrip(c, None)).all()
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 575e0a8ef..474556b30 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -2243,7 +2243,7 @@ def all(a, axis=None, out=None, keepdims=np._NoValue):
>>> o=np.array(False)
>>> z=np.all([-1, 4, 5], out=o)
>>> id(z), id(o), z
- (28293632, 28293632, array([ True])) # may vary
+ (28293632, 28293632, array(True)) # may vary
"""
return _wrapreduction(a, np.logical_and, 'all', axis, None, out, keepdims=keepdims)
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index 355b66df9..34d089893 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -199,7 +199,7 @@ def byte_bounds(a):
>>> high - low == I.size*I.itemsize
True
>>> I = np.eye(2); I.dtype
- dtype('complex256') # may vary
+ dtype('float64')
>>> low, high = np.byte_bounds(I)
>>> high - low == I.size*I.itemsize
True