| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
| | |
|
| |\ |
|
| | |\
| | | |
| | | | |
DOC: Document/ Deprecate functions exposed in "numpy" namespace
|
| | | | |
|
| | | | |
|
| |/ / |
|
| |\ \
| | | |
| | | | |
BUG: (py2 only) fix unicode support for savetxt fmt string
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
By now, all that is needed is to also allow unicode strings to
pass through. Adds a test for the support which already succeeds
on python3.
Closes gh-4053 (replaces the old PR)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
a partial mitigation of #12759.
see also https://nvd.nist.gov/vuln/detail/CVE-2019-6446
|
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* minor reviewer adjustments in PR
13301: in test_structured_padded it
is necessary to perform the seek
after writing to the file, and to
specify a fmt option to match
the expected result
|
| |/
| |
| |
| |
| |
| | |
As a general rule, _every_ use of `.descr` is broken.
Fixes #13297
|
|/
|
|
| |
Previously this would fail with `ValueError: could not assign tuple of length 2 to structure with 3 fields.`, now it raises `NotImplementedError`.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#12448)
* Review F401,F841,F842 flake8 errors (unused variables, imports)
* Review comments
* More tests in test_installed_npymath_ini
* Review comments
|
|
|
|
|
| |
Fixes #10409
Closes #11530
|
|
|
| |
* ENH: Improve support for pathlib.Path objects in more functions
|
|\
| |
| | |
ENH: maximum lines of content to be read from numpy.loadtxt
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* replace most usage of SkipTest() with
pytest.skip()
* where possible, we avoid use of the standard
library SkipTest because unittest skipping
is routed through the pytest nose compatibility
layer in that scenario, which can prevent an easy
trace back to the test line where the skip
occurred
|
|/ |
|
|
|
|
|
|
|
|
| |
After the pytest migration, test classes no longer inherit
from unittest.TestCase and and the fail method does not
exist anymore.
In all these cases, we can use assert_raises and assert_raises_regex instead
|
|
|
|
|
| |
It's a straightforward copy&paste error, but it means not all these
tests get run.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
| |
| |
| | |
Fixes gh-10780
|
|/ |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|\
| |
| | |
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.
|
|\ \
| |/
|/| |
BUG: Resize bytes_ columns in genfromtxt
|
| |
| |
| |
| | |
Fixes gh-10394, due to regression in gh-10054
|
|/
|
| |
Found via `codespell`
|
|
|
|
| |
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.
|
|
|
|
|
| |
savetxt does not support saving arrays of dimension 0 or higher than 2.
This pull request improves the message of the error raised.
|
| |
|
|
|
|
|
|
|
| |
This is the case for x in {int, bool, str, float, complex, object}.
Using the np.{x} version is deceptive as it suggests that there is a
difference. This change doesn't affect any external behaviour. The
`long` type is missing in python 3, so np.long is still useful
|
| |
|
|\
| |
| | |
TST/BUG: fromfile - fix test and expose bug with io class argument
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This bug only manifests itself in the Python 2 code path.
Falls back to the current Python 3 code path also on Python 2 because
the Python 3 code path is written precisely to handle this situation.
Also fix tests, and clarify in the documentation that the current
implementation requires the stream to be seekable.
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
The original dtype converters for bytes and str
did not account for converting objects of str or
bytes dtype respectively. Replace the original
converters with those from numpy.compat, which
are much more robust.
Closes gh-8033.
|