| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The pmt function in financial.py does a zero divide when rate=0 because
error because the alternatives in np.where() are evaluated befor the
selection is made.first before going into the function however, the
denominator can be zero at that time.
Closes #4701.
|
|\ \
| | |
| | | |
ENH: speed-up in1d replacing sorting with fancy indexing
|
| | | |
|
| | |
| | |
| | |
| | | |
The strings must be produced by the python float.hex method.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
Also, added unittest for [int, array] combination arguments
|
|/ /
| |
| |
| | |
This bug was reported in Debian as: http://bugs.debian.org/777172 .
|
|\ \
| | |
| | | |
BUG: Fix genfromtext NameValidator arguments passed to easy_dtype.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The function was useing `'u' in case_sensitive` to detect `upper`.
Make that more precise with `case_sensitive.startswith('u').
Raise ValueError if case_sensitive has unrecognized value.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The case_sensitive argument to np.recfromcsv has a default value of
'lower'. That value was not previously correctly passed on, but is
now, so the previous expected values in this test were incorrectly
upper cased.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \
| | |
| | | |
ENH: Improve arg handling & enhance test suite for `np.pad`
|
| | | |
|
|\ \ \
| | | |
| | | | |
Special case matrix
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This is an ugly hack to preserve backwards compatibility for code
that uses matrices. It is needed since both diag and diagonal have
been changed to preserve subtypes otherwise.
Note that a.diagonal() still returns matrices when a is a matrix.
|
|\ \ \ \
| | | | |
| | | | | |
ENH: add np.nanprod
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This PR adds an implementation of `nanprod`.
The actual function is a two-liner adapted from `nansum`. Most of this PR
consists of documentation and tests (for which I took the opportunity to do
some consolidation).
A method with the same functionality exists in pandas, and I was surprised to
discover that it's not in numpy.
|
| |/ /
|/| |
| | |
| | | |
As discussed on gh-5413. Version 2.0 was added in gh-4765.
|
| | |
| | |
| | |
| | | |
[ci skip]
|
|/ / |
|
|\ \
| | |
| | | |
Cleanups in documentation formatting.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- {ndarray, bool} -> ndarray or bool
- {int, array of ints} -> int or array of ints
- {str, function} -> str or function
- {sequnce, int} -> sequence or int
- {array_like, poly1d} -> array_like or poly1d
- {None, list of `m` scalars, scalar} -> list of `m` scalars or scalar
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
change '{ndarray, float}' -> 'ndarray or float' as {} are for
when the value is an enumeration
|
|\ \ \
| | | |
| | | | |
Fix #2015: diag returns ndarray instead of matrix
|
| | | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
If x is a matrix, np.diag(x) and np.diagonal(x) now return matrices
instead of arrays. Both of these cause x.diagonal() to be called.
That means they return row vectors (just like x.flatten(), x.ravel(),
x.cumprod(), etc.)
|
|/ /
| |
| |
| | |
'save' docstring.
|
| |
| |
| |
| |
| | |
The new searchsorted-based digitize introduced in #5101 segfaults
when it should raise a TypeError.
|
| | |
|
|\ \
| | |
| | | |
MAINT: refactor packbits/unpackbits
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Pushes the GIL release one loop outward. First test for these functions (!).
Incorporates suggestions by @jaimefrio and @charris.
|
|\ \ \
| | | |
| | | | |
ENH: More explicit error message for np.savetxt
|
| |/ / |
|
|/ /
| |
| |
| | |
numpy.lib._iotools.StringConverter.upgrade should have a return value
|
| | |
|
| |
| |
| |
| |
| | |
This allows dir(bagobj), and also enables tab-completion on a BagObj,
which can be useful in an interpreter or IPython
|
|\ \
| | |
| | |
| | | |
Update to average calculation
|
| | |
| | |
| | |
| | | |
closes gh-5202
|