| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
ENH: Multiple comment tokens in loadtxt
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
| |
The problem is that the Python complex type constructor only accepts a
pair of numbers or a string, unlike other numeric types it does not work
with byte strings. The numpy error is subtle, as loadtxt opens the file
in the default text mode, but then converts the input lines to byte
strings when they are split into separate values. The fix here is to
convert the values back to strings in the complex converter.
Closes #5655.
|
| |
|
|
|
|
|
|
| |
Add pickle compatibility flags to numpy.save and numpy.load. Allow only
combinations that cannot corrupt binary data in Numpy arrays. Use the
same default values as Python pickle.
|
|
|
|
|
| |
Fixed typos in docstrings were updated for functions where the parameter
names in the docstring didn't match the function signature.
|
|
|
|
|
|
|
|
| |
Add _floatconv to npyio.py as a default floating point converter. This
uses float() as a type conversion with a fallback on (ValueError) to
float.fromhex().
Closes #2517.
|
|\
| |
| | |
BUG: Fix genfromtext NameValidator arguments passed to easy_dtype.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
np.genfromtxt validates field names twice: once in genfromtxt and once
in easy_dtype. Whilst the arguments to genfromtxt are used in the first
validation, they aren't passed to easy_dtype (which is used only when
dtype != None) and therefore in this case the default validation (strip
non-alphanum, replace spaces) gets confusingly applied, ignoring
genfromtxt's arguments.
This patch adds fixes genfromtxt by passing the appropriate arguments
onwards to easy_dtype. That is probably the least invasive way to fix
the issue.
|
|\ \
| | |
| | | |
ENH:Add keyword max_rows to genfromtxt.
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 _compiled_base module into multiarray
|
| |
| |
| |
| | |
Allows access to internal functions for the file.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
[ci skip]
|
| |
|
|
|
|
| |
'save' docstring.
|
| |
|
|
|
|
|
| |
This allows dir(bagobj), and also enables tab-completion on a BagObj,
which can be useful in an interpreter or IPython
|
|\
| |
| |
| | |
BUG: fix genfromtxt check of converters when using usecols
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\ \
| |/
| | |
Charris pep8 numpy lib
|
| |
| |
| |
| | |
The rules enforced are the same as those used for scipy.
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
| |
closes gh-312
|
|
|
| |
newline and delimiter can be strings not only single characters
|
|\
| |
| | |
DOC: Docstring fix for `savetxt` (minor change)
|
| | |
|
|/
|
|
| |
Resolves #2591. Adds more explicit error handling in line parsing loop.
|
|\
| |
| | |
MAINT (API?): organize npyio.recfromcsv defaults
|
| |
| |
| |
| |
| | |
Removed two irrelevant comments about code history.
P.S. my first try with Github's online editor.
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 .
|
| | |
|
| |
| |
| |
| |
| |
| | |
`loose` `missing` and `skiprows` were missing from the docstring of
`npyio.genfromtxt`. The later two are actualy deprecated, but were added
nonetheless.
|
|\ \
| |/
|/| |
DOC: Improve the documentation of numpy.load.
|
| |
| |
| |
| |
| |
| |
| | |
Add the fact that for pickled files, a file-like object must also
support the readline() method.
Closes #2807.
|
|/ |
|
|
|
|
|
| |
This is default behavior in 3.x; in 2.x open() doesn't have a `newline`
kw. So make code Python-version-specific.
|
| |
|
|
|
|
| |
fixing one typo in npyio.py
|
|
|
|
| |
Two slight style modifications in npyio, regarding line length.
|
|
|
|
|
|
| |
Various pep8 fixes for npyio.py
Also reorganized the imports, and removed the unnecessary (I hope)
`_string_like = _is_string_like` statement.
|
| |
|
| |
|
| |
|