| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
* fixed doc typo
* fixed lib typos
* fixed lapack_lite typos
* Revert "fixed lapack_lite typos"
This reverts commit e7dada860cb73af190234402508ab79965ecd079.
|
|\
| |
| | |
TST: Extract a helper function to test for reference cycles
|
| |
| |
| |
| |
| |
| | |
This also means we can now test that our test is actually able to detect the type of failure we expect
Trying to give myself some tools to debug the failure at https://github.com/numpy/numpy/pull/10882/files#r180813166
|
| |
| |
| |
| | |
Closes #10847
|
| |
| |
| |
| | |
Fixes gh-10780
|
|\ \
| | |
| | | |
BUG: fix savetxt, loadtxt for '+-' in complex
|
| | | |
|
| |/
|/| |
|
|/
|
| |
Now falls back on sturges estimator when the IQR is zero
|
| |
|
| |
|
| |
|
|
|
|
|
| |
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
|
|
|
|
|
|
|
|
|
|
|
| |
Use standard pytest markers everywhere in the numpy tests. At this point
there should be no nose dependency. However, nose is required to test
the legacy decorators if so desired.
At this point, numpy test cannot be run in the way with runtests, rather
installed numpy can be tested with `pytest --pyargs numpy` as long as
that is not run from the repo. Run it from the tools directory or some
such.
|
|
|
|
|
|
| |
The renamed C modules provide low level functions for testing. The
rename marks them as private functions and makes them invisible to
pytest by default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes a few left over uses of unittest. The main changes apart
from removal of Test case are:
* `setUp` replaced by nose and pytest compatible `setup`
* `tearDown` replaced by nose and pytest compatible `teardown`
* `assertRaises` replaced by `assert_raises`
* `assertEqual` replaced by `assert_equal`
The last two are in `numpy/testings/tests/test_utils.py`, so may seem a
but circular, but at least are limited to those two functions.
The use of `setup` and `teardown`, can be fixed up with the pytest
equivalents after we have switched to pytest.
|
|\
| |
| | |
BUG: fix complex casting error in cov with aweights
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using cov with a complex input and with aweights specified, cov
will error as a result of trying to cast a complex value into a float64.
This comes about since average is used to calculate the sum of the
weights from aweights. average returns the sum of weights as the same
type as its result, not the weights type. For a complex input m, and
any type for aweights, this would result in a complex value for fact.
It appears the primary purpose of np.float64(fact) is to provide a NaN
value from the divide when fact is an integer zero. This has been
replaced by using numpy.divide to replicate the same behavior, but to
also handle complex types.
|
| |
| |
| |
| |
| | |
Fixes #10183
Documentation is copied from np.histogram
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* TST: skip refcount-requiring tests if sys.refcount is missing
* ENH: io: add refcheck=False to a safe .resize() call
The array is allocated immediately above, and the resize always succeeds
so it is not necessary to check it. Fixes Pypy compatibility.
* TST: remove unused code
* TST: factor skipif(not HAS_REFCOUNT) into a separate decorator
|
|/
|
|
|
|
|
|
|
|
| |
These are now handled generically by the underlying C function
This fixes the period argument for 0d arrays.
Now never returns a pure-python scalar, which matches the behaviour of most of numpy.
Rework of b66a200a4a1e98f1955c8a774e4ebfb4588dab5b
|
|\
| |
| | |
BUG: fromregex: asbytes called on regexp objects
|
| |
| |
| |
| |
| |
| | |
When calling fromregex() with a binary stream and a regular expression
object, asbytes() was called on the regexp object, resulting in an
incorrect regular expression being compiled and used.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The optimization was to sort integer subarrays by treating them as
strings of unsigned bytes. That worked fine for finding the unique
subarrays, but the sort order of the results could be unexpected.
Closes #10495.
|
|\ \
| | |
| | | |
BUG: Fix crashes when using float32 values in uniform histograms
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes #8123, closes #9189, fixes #10319
This is a workaround to #10322, not a fix for it.
Adds tests for cases where bounds are more precise than the data, which led to inconsistencies in the optimized path.
|
|\ \ \
| | | |
| | | | |
BUG: Resize bytes_ columns in genfromtxt
|
| | | |
| | | |
| | | |
| | | | |
Fixes gh-10394, due to regression in gh-10054
|
| | | | |
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | |
| | | |
This previously failed with:
TypeError: Cannot cast ufunc subtract output from dtype('complex128') to dtype('float64') with casting rule 'same_kind'
|
|\ \ \
| | | |
| | | | |
BUG: arrays not being flattened in `union1d`
|
| | | |
| | | |
| | | | |
[ci skip]
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
MAINT: pytest cleanups
|
| | | | |
|
| |_|/
|/| |
| | | |
Found via `codespell`
|
|/ / |
|
| |
| |
| |
| | |
Currently only supported for explicit bins
|
| |
| |
| |
| |
| | |
Fixes gh-7503
Closes gh-8984
|
| |
| |
| |
| | |
Closes gh-7864
|
|\ \ |
|
| |/
| |
| |
| | |
Fixes gh-9233
|
|/
|
|
|
|
|
| |
800 self-contained lines are easily enough to go in their own file, as are the 500 lines of tests.
For compatibility, the names are still available through `np.lib.function_base.histogram` and `from np.lib.function_base import *`
For simplicity of imports, all of the unqualified `np.` names are now qualified
|
|
|
|
| |
Minor cleanups of old code to reflect more modern usage.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This modifies loadtxt and genfromtxt in several ways intended to add
unicode support for text files by adding an `encoding` keyword to
np.load, np.genfromtxt, np.savetxt, and np.fromregex. The original
treatment of the relevant files was to open them as byte
files, whereas they are now opened as text files with an encoding. When
read, they are decoded to unicode strings for Python3 compatibility,
and when written, they are encoded as specified. For backward
compatibility, the default encoding in both cases is latin1.
|
| |
|
|
|
| |
Fixes #9995
|