summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/add_newdocs.py31
-rw-r--r--numpy/lib/user_array.py17
2 files changed, 32 insertions, 16 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 7eef07c4a..e79720c77 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -3888,13 +3888,13 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('newbyteorder',
----------
new_order : string, optional
Byte order to force; a value from the byte order specifications
- above. `new_order` codes can be any of::
+ below. `new_order` codes can be any of:
- * 'S' - swap dtype from current to opposite endian
- * {'<', 'L'} - little endian
- * {'>', 'B'} - big endian
- * {'=', 'N'} - native order
- * {'|', 'I'} - ignore (no change to byte order)
+ * 'S' - swap dtype from current to opposite endian
+ * {'<', 'L'} - little endian
+ * {'>', 'B'} - big endian
+ * {'=', 'N'} - native order
+ * {'|', 'I'} - ignore (no change to byte order)
The default value ('S') results in swapping the current
byte order. The code does a case-insensitive check on the first
@@ -6359,16 +6359,15 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('newbyteorder',
Parameters
----------
new_order : string, optional
- Byte order to force; a value from the byte order
- specifications below. The default value ('S') results in
- swapping the current byte order.
- `new_order` codes can be any of::
+ Byte order to force; a value from the byte order specifications
+ below. The default value ('S') results in swapping the current
+ byte order. `new_order` codes can be any of:
- * 'S' - swap dtype from current to opposite endian
- * {'<', 'L'} - little endian
- * {'>', 'B'} - big endian
- * {'=', 'N'} - native order
- * {'|', 'I'} - ignore (no change to byte order)
+ * 'S' - swap dtype from current to opposite endian
+ * {'<', 'L'} - little endian
+ * {'>', 'B'} - big endian
+ * {'=', 'N'} - native order
+ * {'|', 'I'} - ignore (no change to byte order)
The code does a case-insensitive check on the first letter of
`new_order` for these alternatives. For example, any of '>'
@@ -7231,10 +7230,10 @@ add_newdoc('numpy.core.numerictypes', 'generic', ('newbyteorder',
The `new_order` code can be any from the following:
+ * 'S' - swap dtype from current to opposite endian
* {'<', 'L'} - little endian
* {'>', 'B'} - big endian
* {'=', 'N'} - native order
- * 'S' - swap dtype from current to opposite endian
* {'|', 'I'} - ignore (no change to byte order)
Parameters
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):