diff options
| author | Alan McIntyre <alan.mcintyre@local> | 2008-07-02 03:15:46 +0000 |
|---|---|---|
| committer | Alan McIntyre <alan.mcintyre@local> | 2008-07-02 03:15:46 +0000 |
| commit | 016b1f61c0a5c2e49ece0b6b1d31daf42bc2d1a7 (patch) | |
| tree | 280cc634c6dbe77ca48332afb4ddbc265ab80426 /numpy/core/records.py | |
| parent | aa26afb8fbb6901bed42e895e410728b0dd1f6bc (diff) | |
| download | numpy-016b1f61c0a5c2e49ece0b6b1d31daf42bc2d1a7.tar.gz | |
Update doctests to use the implicit "import numpy as np" made available to all doctests.
Update doctests to use fully qualified names.
Fixed typo in numerictypes.py: english_lower doctest has an example using english_upper
Diffstat (limited to 'numpy/core/records.py')
| -rw-r--r-- | numpy/core/records.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py index 26ebba450..8d870eb22 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -428,7 +428,8 @@ def fromrecords(recList, dtype=None, shape=None, formats=None, names=None, If formats is None, then this will auto-detect formats. Use list of tuples rather than list of lists for faster processing. - >>> r=fromrecords([(456,'dbe',1.2),(2,'de',1.3)],names='col1,col2,col3') + >>> r=np.core.records.fromrecords([(456,'dbe',1.2),(2,'de',1.3)], + ... names='col1,col2,col3') >>> print r[0] (456, 'dbe', 1.2) >>> r.col1 @@ -522,7 +523,8 @@ def fromfile(fd, dtype=None, shape=None, offset=0, formats=None, >>> a.tofile(fd) >>> >>> fd.seek(0) - >>> r=np.fromfile(fd, formats='f8,i4,a5', shape=10, byteorder='<') + >>> r=np.core.records.fromfile(fd, formats='f8,i4,a5', shape=10, + ... byteorder='<') >>> print r[5] (0.5, 10, 'abcde') >>> r.shape |
