| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| | |
The test_fancy in numpy/lib/tests/test_function_base.py failed in
release because a DeprecationWarning was no longer raised, it had
become a warning.
|
|/
|
|
| |
the notes were wrong in the order of the index for p.
|
|
|
|
|
| |
Make this happen and remove test parts dependent on numpy version
< 1.9. Fixes test failures in numpy after 1.8 branch.
|
|
|
|
|
|
|
| |
Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long
and will need to be broken at some point. OTOH, some lines were already
too long and need to be broken at some point. Now seems as good a time
as any to do this with open PRs at a minimum.
|
|
|
|
| |
Now is as good a time as any with open PR's at a low.
|
| |
|
| |
|
|
|
|
|
| |
Accept any object with a "write" method as that is the only method
called by the code.
|
|
|
|
|
|
| |
Fix typos and clarify some explanations. Document the changes in the return
values of nanargmin and nanargmax for all-NaN slices in the 1.8.0 release
notes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nanmax, nanmin
--------------
Add out and keepdims keywords.
nanargmin, nanargmax
--------------------
A NanWarning is raised if an all NaN slice detected. For all such
slices np.iingo(np.intp).min is returned as the index value.
nansum
------
The keywords dtype, out, and keepdims are added.
A FutureWarning is raised, as in the future the mean of an empty
slice after NaN replacement will be 0 instead of the current NaN.
nanmean, nanvar, nanstd
-----------------------
For all, if the input array is of inexact type then the dtype and out
parameters must be of inexact type if specified. That insures that NaNs
can be returned when appropriate.
The nanmean function detects empty slices after NaN replacement and
raises a NanWarning. NaN is returned as the value for all such slices.
The nanmean and nanstd functions detect degrees of freedom <= 0 after
NaN replacement and raise a NanWarning. NaN is returned as the value for
all such slices.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New files lib/nanfunctions.py and lib/tests/test_nanfunctions.py are
added and both the previous and new nan functions and tests are moved
into them.
The existing nan functions moved from lib/function_base are:
nansum, nanmin, nanmax, nanargmin, nanargmax
The added nan functions moved from core/numeric are:
nanmean, nanvar, nanstd
|
|
|
|
|
|
| |
Partitioning is sufficient to obtain the median and is much faster.
In the case of overwrite_input=True the resulting array will not be
fully sorted anymore.
|
| |
|
| |
|
| |
|
|
|
|
| |
Also add test for IndexError exception when axis is out of bounds.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Updated documentation for histogram2d() in twodim_base.py according to discussion
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
WarningManager was a workaround for the lack of the with statement
in Python versions < 2.6. As those versions are no longer supported
it can be removed.
Deprecation notes are added to WarningManager and WarningMessage, but
to avoid a cascade of messages in third party apps, no warnings are
raised at this time, that can be done later.
Closes #3519.
|
|\ \
| | |
| | | |
MAINT: Use np.errstate context manager.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now that Python < 2.6 is no longer supported we can use the errstate
context manager in places where constructs like
```
old = seterr(invalid='ignore')
try:
blah
finally:
seterr(**old)
```
were used.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Because Numpy 1.8.0 will no longer supports Python versions < 2.6 we
no longer need to check for that and can also remove the code that is
specific to those earlier versions.
To make this a bit safer, the toplevel setup.py file now contains a
check of the Python version number and raises an error when run by an
unsupported version.
|
| | |
|
| |
| |
| |
| |
| | |
np.pad will now accept a pad_width containing zeros. The functionality
was already implemented, but validation of input was too strict.
|
| |
| |
| |
| |
| |
| |
| | |
This assures that when the loaded file is closed it also closes the
file descriptor, avoiding a resource warning in Python3.
Closes #3457.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Maximum data size limitations in the crc32 module cause errors when
reading more than 2 ** 32 bytes from gzip streams. Work around this
issue when reading large arrays from npz files by chunking reads to
256mb.
This appears to resolve bug #2922.
|
| | |
|
|\ \
| | |
| | | |
Deprecate non integer arguments
|
| | |
| | |
| | |
| | | |
Also minor changes in the documentation.
|
| | |
| | |
| | |
| | | |
Following deprecations would cause problems otherwise.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Correct the implementation of the npv function, its documentation, and
the mirr function that depends on it. The test_financial.py is also
corrected to take into account those modifications
The npv function behavior was contrary to what the documentation stated
as it summed indexes 1 to M instead of 0 to M-1. The mirr function used
a corrective factor to get the correct result in spite of that error so
that factor is removed.
Closes #649
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
memmap needs to call it in __array_finalize__ to determine if it can
drop the references on copies.
The python version if may_share_memory caused significant slowdowns when
slicing these maps.
closes gh-3364
|
| | | |
|
|\ \ \
| | | |
| | | | |
DOC: Min max docstrings
|
| | | | |
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
ENH: improved, faster algorithm for array padding
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
New padding method which scales much better with dimensionality.
This new implementation is fully vectorized, builds each abstracted
n-dimensional padding block in a single step, and takes advantage
of separability. The API is completely preserved, and the old
algorithm is used if a vector function is input for `mode`.
The new algorithm is faster for all tested combinations of inputs,
and scales much better with dimensionality. Execution time reductions
from ~25% for small rank 1 arrays to >99% for rank 4+ arrays observed.
|
|/ /
| |
| |
| | |
broadcast_arrays() does not handle struct and custom dtypes correctly. Dtype of returned broadcasted arrays is always '|V8'. Fix broadcast_arrays() so that dtype of returned arrays is correct dtype for user defined dtypes.
|
| |
| |
| |
| |
| |
| | |
Audit numpy/lib/arraypad.py for pep8 and pep257 compliance.
Also fix a few minor docstring corrections converting ] into ) or
vice versa.
|
|\ \
| | |
| | | |
DOC: Change example to demonstrate function
|