summaryrefslogtreecommitdiff
path: root/numpy/lib/user_array.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-01-05 12:56:26 -0700
committerCharles Harris <charlesr.harris@gmail.com>2016-01-05 16:17:04 -0700
commit40e47e06e741797efef60211c58e30ff82c7191f (patch)
tree3f71e7ccdcb2baab41a1839887bbfe117339aadb /numpy/lib/user_array.py
parent346c700ab16da1deaf95e9f0331ffd76fb2162fa (diff)
downloadnumpy-40e47e06e741797efef60211c58e30ff82c7191f.tar.gz
DOC,BUG: Fix some latex generation problems.
Some of the documentation for newbyteorder, copy and pasted in several spots, had paragraphs ending in `::`, initiating a sphinx generated Verbatim environment and resulting in "LaTeX Error: Too deeply nested". The user_array.container class needed non-empty class documentation. That that caused a problem is probably a numpydoc bug, but it is easy to fix. [skip ci]
Diffstat (limited to 'numpy/lib/user_array.py')
-rw-r--r--numpy/lib/user_array.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/numpy/lib/user_array.py b/numpy/lib/user_array.py
index bb5bec628..3103da57b 100644
--- a/numpy/lib/user_array.py
+++ b/numpy/lib/user_array.py
@@ -1,5 +1,6 @@
"""
Standard container-class for easy multiple-inheritance.
+
Try to inherit from the ndarray instead of using this class as this is not
complete.
@@ -16,7 +17,19 @@ from numpy.compat import long
class container(object):
+ """
+ container(data, dtype=None, copy=True)
+
+ Standard container-class for easy multiple-inheritance.
+
+ Methods
+ -------
+ copy
+ tostring
+ byteswap
+ astype
+ """
def __init__(self, data, dtype=None, copy=True):
self.array = array(data, dtype, copy=copy)
@@ -219,15 +232,19 @@ class container(object):
return self._rc(greater_equal(self.array, other))
def copy(self):
+ ""
return self._rc(self.array.copy())
def tostring(self):
+ ""
return self.array.tostring()
def byteswap(self):
+ ""
return self._rc(self.array.byteswap())
def astype(self, typecode):
+ ""
return self._rc(self.array.astype(typecode))
def _rc(self, a):