| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Fixups to docstring, and disallow non-scalars as the distance args to
np.gradient.
Fixes #7548, fixes #6847
|
|\
| |
| | |
MAIN: fix to #7382, make scl in np.average writeable
|
| | |
|
|/ |
|
|
|
|
|
| |
Removed superfluous `ceil` call in automated bin width estimator.
Updated tests to reflect modified estimator.
|
|
|
|
|
| |
Described ad nauseum the relationship between `range` parameter and bin estimation.
Updated formulas for estimators now that they are returning bin widths.
|
|
|
|
|
| |
Fixes #7411. Tests and documentation updated.
Fixes other small issues with range and bin count computations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes bug in string copying in np.place
in which replacements strings that were
smaller than their replaced elements
would only partially replace the element
instead of the entire element.
Closes gh-6974.
Addendum: this commit also appears to have
fixed issue with overflow for very large
input arrays.
Closes gh-7207.
|
|\
| |
| | |
Tweak corrcoef
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The non-nan elements of the result of corrcoef should satisfy the
inequality abs(x) <= 1 and the non-nan elements of the diagonal should
be exactly one. We can't guarantee those results due to roundoff, but
clipping the real and imaginary parts to the interval [-1, 1] improves
things to a small degree.
Closes #7392.
|
| |
| |
| |
| |
| | |
The input arrays are documented to have ndim <=2, so check for that
and raise a ValueError on failure.
|
|\ \
| |/
|/| |
Generalized flip
|
| | |
|
| | |
|
|/
|
| |
This is just me being OCD. I am not sure this even merits a full commit, much less a PR, but here goes anyway.
|
|\
| |
| | |
MAINT: Cleanup for histogram bin estimator selection
|
| |
| |
| |
| |
| |
| | |
Private function with superfluous checks was removed. Estimator
Estimator functions are now semi-public and selection is simplified
within histogram itself.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Since shuffle only works along the first dimension, it must be done before
reshape to get reasonable looking data. Did not affect the current tests. I
noticed while working on some scipy code.
Also, made a couple of doc changes to np.random.shuffle.
|
|/
|
|
| |
Closes gh-7113.
|
|
|
|
| |
number of bins and associated tests
|
| |
|
| |
|
| |
|
|\
| |
| | |
DOC: Updated minor typos in function_base.py and test_function_base.py
|
| | |
|
|/ |
|
|\
| |
| | |
BUG: Fixed 'midpoint' interpolation of np.percentile in odd cases.
|
| |
| |
| |
| |
| | |
'midpoint' must return the same as 'higher' and 'lower' when the two
are the same, not 'lower' + 0.5 as it was doing.
|
|\ \
| | |
| | | |
BUG: Fixed regressions in np.piecewise in ref to #5737 and #5729.
|
| | | |
|
| | |
| | |
| | |
| | | |
Added unit tests for these conditions.
|
|\ \ \
| |/ /
|/| | |
DOC: Updated documentation wording and examples for np.percentile.
|
| | | |
|
| |/
| |
| |
| | |
Examples had some factual errors. Wording updated in a couple of places.
|
|/ |
|
|
|
|
|
|
|
| |
np.put and np.place do something only when the first argument
is an instance of np.ndarray. These changes will cause a TypeError
to be thrown in either function should that requirement not be
satisfied.
|
|
|
|
| |
[ci skip]
|
|
|
|
| |
[ci skip]
|
|
|
|
| |
Closes gh-6863.
|
|
|
|
| |
The rowvar and bias parameters are booleans, not integers.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug traces to the PyArray_OrderConverter
method in conversion_utils.c, where no errors
are thrown if the ORDER parameter passed in
is not of the string data-type or has a string
value of length greater than one. This commit
causes a DeprecationWarning to be raised, which
will later be turned into a TypeError or another
type of error in a future release.
Closes gh-6598.
|
|
|
| |
In all cases, it's either ...*n^(-1/3) or .../n^(1/3), not both. The actual functions are implemented correctly.
|
|
|
|
| |
assure this. Improved some error-types.
|
|
|
|
|
| |
np.median([]) returns NaN. Fixes bug/regression that raised an IndexError.
Added tests to ensure continued support of empty arrays.
|
|
|
|
|
|
|
| |
The argument for the original input array is named `a`
but in the docstring it was at some point referred to as `arr`.
[skip ci]
|
|\
| |
| | |
ENH: speed up cov by ~10% for large arrays
|
| |
| |
| |
| | |
Replaces n² divisions by one division and n² multiplications.
|
|\ \
| | |
| | | |
MAINT: corrcoef, memory usage optimization
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We calculate sqrt on the small vector rather than on that huge
product matrix and we combine the "outer" product with element-wise
devision. So even though we have a slower loop over the rows now ... this
code snippet runs about 3 times faster than before.
However the speed improvement of the whole function is not really
significant because cov() takes 80-99% of the time (dependent on
blas/lapack implementation and number of CPU cores).
More important is that we will safe 1/3 memory. For example corrcoef()
for a [23k, m] matrix needs 8GB now instead of 12GB.
|
|\ \ \
| | |/
| |/| |
ENH: halve the memory requirement of np.cov
|