summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * | ENH: genfromtxt: Change 'nrows' to 'max_rows'.Warren Weckesser2015-01-231-18/+17
| | |
| * | ENH:Add keyword nrows to genfromtxt.styr2015-01-231-1/+20
| |/ | | | | | | | | | | | | | | | | | | This allows one to specify the maximum number of row processed in in a call. The new functionality allows for reading more complex data formats. For instance, multiple calls can be used to read in multiple arrays stored in a single file. Closes #5084. Closes #5093.
* | Merge pull request #5476 from juliantaylor/merge-cbaseJaime2015-01-231-1/+1
|\ \ | |/ |/| merge _compiled_base module into multiarray
| * MAINT: merge _compiled_base module into multiarrayJulian Taylor2015-01-221-1/+1
| | | | | | | | Allows access to internal functions for the file.
* | BUG: Fix loadtxt with comments=None and a string None data.Leonardo Donelli2015-01-231-2/+6
| | | | | | | | | | | | | | | | Current loadtxt with `comments=None` considers the string `'None'` as a comment symbol. Fixed by making split_line method check if comments is None. Closes #5155.
* | DOC: improve record/structured array nomenclature & guideAllan Haldane2015-01-221-2/+2
|/ | | | | | | | | | | This update adds a section better describing record arrays in the user guide (numpy/doc/structured_arrays.py). It also corrects nomenclature, such that "structured array" refers to ndarrays with structured dtype, "record array" refers to modified ndarrays as created by np.rec.array, and "recarray" refers to ndarrays viewed as np.recarray. See the note at the end of the structured array user guide.
* DOC: link to the npy-format NEP in numpy.npyio docs. Closes gh-4523.Ralf Gommers2015-01-021-2/+5
| | | | [ci skip]
* remove trailing whitespaceValentin Haenel2014-12-271-2/+2
|
* DOC: Give a more explicit reference to the .npy format documentation in the ↵Warren Weckesser2014-12-121-1/+2
| | | | 'save' docstring.
* ENH: More explicit error message for np.savetxtAdam Williams2014-11-301-1/+6
|
* ENH: add BagObj.__dir__ to numpy.lib.npyioWendell Smith2014-11-181-0/+8
| | | | | This allows dir(bagobj), and also enables tab-completion on a BagObj, which can be useful in an interpreter or IPython
* Merge pull request #5006 from dhomeier/ioconv_usecolsJulian Taylor2014-08-271-6/+9
|\ | | | | | | BUG: fix genfromtxt check of converters when using usecols
| * BUG: fix genfromtxt check of converters when using usecolsDerek Homeier2014-08-271-6/+9
| | | | | | | | | | | | fixes an issue reported by Adrian Altenhoff where user-supplied converters in genfromtxt were not tested with the right first_values when also specifying usecols.
* | BUG: io: genfromtxt did not handle filling_values=0 correctly. Closes gh-2317.Warren Weckesser2014-08-151-1/+3
| |
* | Merge pull request #4929 from juliantaylor/charris-pep8-numpy-libCharles Harris2014-07-311-18/+17
|\ \ | |/ | | Charris pep8 numpy lib
| * STY: Make files in numpy/lib PEP8 compliant.Charles Harris2014-07-311-16/+13
| | | | | | | | The rules enforced are the same as those used for scipy.
| * MAINT: Fixes for problems in numpy/lib revealed by pyflakes.Charles Harris2014-07-311-2/+4
| | | | | | | | | | | | Some of those problems look like potential coding errors. In those cases a Fixme comment was made and the offending code, usually an unused variable, was commented out.
* | DOC: remove wrong mention of .gz in np.loadJulian Taylor2014-06-111-2/+1
|/ | | | closes gh-312
* DOC: clarify savetxt delimiter and newline docstringJulian Taylor2014-05-261-2/+2
| | | newline and delimiter can be strings not only single characters
* Merge pull request #4574 from ggventurini/masterJulian Taylor2014-05-261-1/+2
|\ | | | | DOC: Docstring fix for `savetxt` (minor change)
| * Docstring fix for `savetxt`ggventurini2014-04-011-1/+2
| |
* | ENH: Better error w/ line num for bad column count in np.loadtxt()Daniel da Silva2014-04-051-0/+5
|/ | | | Resolves #2591. Adds more explicit error handling in line parsing loop.
* Merge pull request #3830 from jarondl/recfromcsvCharles Harris2014-03-281-10/+13
|\ | | | | MAINT (API?): organize npyio.recfromcsv defaults
| * STY: change and delete some comments in recfromcsvjarondl2014-03-121-5/+1
| | | | | | | | | | Removed two irrelevant comments about code history. P.S. my first try with Github's online editor.
| * DOC: npyio.recfromcsv keyword argument changesYaron de Leeuw2014-02-281-0/+5
| | | | | | | | | | | | Added a note to recfromcsv about the `dtype` keyword, as suggested by @hpaulj. Also added a note to the release notes, about the change in the `update` keyword, as suggested by @charris.
| * MAINT (API?): organize npyio.recfromcsv defaultsYaron de Leeuw2014-02-281-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | Organizes the default kwargs in recfromcsv. Changes two undocumented kwargs behaviors: * previously, if a user set `names=None`, it was ignored and replaced with `names=True` * the `dtype` kwarg was ignored. If `update` was given, it was used as `dtype`, and if not, None was used. We can retain the `update` behavior by using `kwargs.setdefault("dtype",kwargs.get('update', None))`. This Closes #311 .
* | DOC: two minor typos in genfromtxtjarondl2014-03-041-2/+2
| |
* | DOC: add missing parameters to npyio.genfromtxt, fix #2929Yaron de Leeuw2014-03-031-1/+9
| | | | | | | | | | | | `loose` `missing` and `skiprows` were missing from the docstring of `npyio.genfromtxt`. The later two are actualy deprecated, but were added nonetheless.
* | Merge pull request #4376 from charris/fix-gh-2807Charles Harris2014-03-011-14/+18
|\ \ | |/ |/| DOC: Improve the documentation of numpy.load.
| * DOC: Improve the documentation of numpy.load.Charles Harris2014-02-261-14/+18
| | | | | | | | | | | | | | Add the fact that for pickled files, a file-like object must also support the readline() method. Closes #2807.
* | DOC: some versionadded notesalex2014-02-271-0/+4
|/
* MAINT: don't use open(.., 'U') in Python 3.x, is deprecated.Ralf Gommers2013-12-231-2/+7
| | | | | This is default behavior in 3.x; in 2.x open() doesn't have a `newline` kw. So make code Python-version-specific.
* MAINT: io: handle a bad fmt argument in savetxt by raising a ValueError.Warren Weckesser2013-10-201-0/+2
|
* STY: pepe8 for npyio continued 2 (typo)Yaron de Leeuw2013-10-111-1/+1
| | | | fixing one typo in npyio.py
* STY: pep8 for npyio continuedYaron de Leeuw2013-10-061-7/+4
| | | | Two slight style modifications in npyio, regarding line length.
* STY: pep8 for npyioYaron de Leeuw2013-09-291-60/+57
| | | | | | Various pep8 fixes for npyio.py Also reorganized the imports, and removed the unnecessary (I hope) `_string_like = _is_string_like` statement.
* fix two typos in npyio.pyValentin Haenel2013-09-261-2/+2
|
* DOC STY: make npyio docstrings less than 80 charsYaron de Leeuw2013-09-211-6/+6
|
* small typoYaron de Leeuw2013-09-151-1/+1
|
* Fixes in the npyio documentationYaron de Leeuw2013-09-151-11/+12
| | | | | | | Fixes the "see also" section of savetxt, which described savez as compressing (closes #587 ). Also replaces all occurences of .npy and .npz to use double backticks. Some had, some did not, and some had " symbols.
* ENH: Make savetxt work with file like objects.Daniel2013-08-151-1/+1
| | | | | Accept any object with a "write" method as that is the only method called by the code.
* BUG: Make np.load transfer file ownership to the returned NpzFile.Charles Harris2013-06-221-4/+9
| | | | | | | This assures that when the loaded file is closed it also closes the file descriptor, avoiding a resource warning in Python3. Closes #3457.
* adjust the optimal IO buffer size for npz filesBartosz Telenczuk2013-06-121-2/+0
|
* BUG: fix loading large npz files (fixes #2922)Bartosz Telenczuk2013-06-121-5/+7
|
* MAINT: Apply 2to3 idioms fixer.Charles Harris2013-05-021-1/+1
| | | | | | | | | | | | | | | | | | | The idioms fixer makes the following replacements. 1) int <- bool 2) comparison or identity of types <- isinstance 3) a.sort() <- sorted(a) There were two problems that needed to be dealt with after the application of the fixer. First, the replacement of comparison or identity of types by isinstance was not always correct. The isinstance function returns true for subtypes whereas many of the places where the fixer made a substitution needed to check for exact type equality. Second, the sorted function was applied to arrays, but because it treats them as iterators and constructs a sorted list from the result, that is the wrong thing to do. Closes #3062.
* MAINT: Remove unneeded version checks.Charles Harris2013-04-241-2/+1
| | | | | | Now that only Python versions 2.6-2.7 and 3.2-3.3 are supported some version checks are no longer needed. This patch removes them so as to clean up the code.
* MAINT: Use from future_builtins zip and map.Charles Harris2013-04-211-3/+2
| | | | | | For Python versions 2.6 and 2.7 the iterator forms of zip and map can be imported from future_builtins. That is done here so as to avoid using itertools.{izip, imap}.
* 2to3: Apply unicode fixer.Charles Harris2013-04-211-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | The unicode fixer strips the u from u'hi' and converts the unicode type to str. The first won't work for Python 2 and instead we replace the u prefix with the sixu function borrowed from the six compatibility package. That function calls the unicode constructor with the 'unicode_escape' encoder so that the many tests using escaped unicode characters like u'\u0900' will be handled correctly. That makes the sixu function a bit different from the asunicode function currently in numpy.compat and also provides a target that can be converted back to the u prefix when support for Python 3.2 is dropped. Python 3.3 reintroduced the u prefix for compatibility. The unicode fixer also replaces 'unicode' with 'str' as 'unicode' is no longer a builtin in Python 3. For code compatibility, 'unicode' is defined either as 'str' or 'unicode' in numpy.compat so that checks like if isinstance(x, unicode): ... will work properly for all python versions. Closes #3089.
* 2to3: Apply next fixer.Charles Harris2013-04-151-4/+4
| | | | | | | | | | | | | | The next builtin has been available since Python 2.6 and allows `it.next()` to be replaced by `next(it)`. In Python 3 the `next` method is gone entirely, replaced entirely by the `__next__` method. The next fixer changes all the `it.next()` calls to the new form and renames the `next` methods to `__next__`. In order to keep Numpy code backwards compatible with Python 2, a `next` method was readded to all the Numpy iterators after the fixer was run so they all contain both methods. The presence of the appropriate method could have been made version dependent, but that looked unduly complicated. Closes #3072.
* Merge pull request #3244 from charris/2to3-apply-zip-fixerCharles Harris2013-04-141-6/+6
|\ | | | | 2to3: Apply zip fixer.