summaryrefslogtreecommitdiff
path: root/numpy/testing/_private
Commit message (Collapse)AuthorAgeFilesLines
* BUG: fix doctest exception messagesmattip2020-02-281-5/+12
|
* DOC: Reword docstring for assert_equal (gh-15614)Harshal Prakash Patankar2020-02-191-1/+1
|
* BUG: Ignore differences in NAN representation for computing ULP differencesRaghuveer Devulapalli2020-02-181-2/+17
|
* MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-061-1/+0
| | | | | | | * Cleanup unused imports (F401) of mostly standard Python modules, or some internal but unlikely referenced modules * Where internal imports are potentially used, mark with noqa * Avoid redefinition of imports (F811)
* STY,MAINT: avoid 'multiple imports on one line' (flake8 E401)Mike Taves2020-01-281-1/+3
| | | | | | * PEP 8: "Imports should usually be on separate lines" * Where modified, sort imported modules alphabetically * Clean-up unused imports from these expanded lines
* STY: use 'yield from <expr>' for simple cases (#15444)Mike Taves2020-01-271-2/+1
| | | | | | | | | This PR uses simple cases of PEP 380 to rewrite: for v in g: yield v into: yield from <expr>
* MAINT: Remove Python2 workaroundsSeth Troisi2020-01-231-3/+0
|
* MAINT: Replace basestring with str.Charles Harris2020-01-231-3/+2
| | | | | | | This replaces basestring with str except in - tools/npy_tempita/ - numpy/compat/py3k.py
* MAINT: Revise imports from collections.abc moduleMike Taves2020-01-221-9/+4
|
* STY: use `with open` when possibleSeth Troisi2020-01-211-6/+4
|
* MAINT: Remove sys.version checks in testsSeth Troisi2020-01-152-21/+2
|
* Merge pull request #15307 from sethtroisi/sys_version_preMatti Picus2020-01-161-49/+8
|\ | | | | MAINT: cleanup sys.version dependant code
| * MAINT: cleanup sys.version dependant codeSeth Troisi2020-01-121-49/+8
| |
* | TST: move _no_tracing to testing._privatemattip2020-01-151-0/+21
|/
* MAINT: Remove python2 array_getslice and array_setslice (#15263)Seth Troisi2020-01-071-2/+0
| | | These implemented the __getslice__ and __setslice__ methods in Python 2, which no longer exist in Python 3.
* Merge pull request #15256 from eric-wieser/use-keyword-only-argumentsMatti Picus2020-01-061-2/+1
|\ | | | | MAINT: Implement keyword-only arguments as syntax
| * MAINT: Implement keyword-only arguments as syntaxEric Wieser2020-01-061-2/+1
| | | | | | | | Now that 2.7 is gone, there is no need to pop manually from kwarg dictionaries.
* | MAINT: Remove references to non-existent sys.exc_clear()Jon Dufresne2020-01-051-3/+0
|/ | | | | sys.exc_clear() was removed in Python 3. All internal uses can be removed.
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-054-5/+5
| | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-034-8/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* Merge pull request #15178 from rgommers/maxulp-msgCharles Harris2020-01-021-2/+3
|\ | | | | TST: improve assert message of assert_array_max_ulp
| * TST: improve assert message of assert_array_max_ulpRalf Gommers2019-12-261-2/+3
| | | | | | | | | | | | It was not showing the max difference before, which makes it hard to judge whether something is seriously wrong, or the test precision simply needs to be bumped by a little.
* | MAINT: better way of indicating whether numpy was built with ILP64 BLASPauli Virtanen2020-01-011-2/+2
|/
* Fix typos, via a Levenshtein-style correctorBrian Wignall2019-12-191-1/+1
|
* ENH: update BLAS symbol suffix/prefix handling in cblasfuncs & linalgPauli Virtanen2019-12-141-1/+1
| | | | Revise the BLAS name mangling to support the general scheme.
* TST: testing: check requires_memory immediately before the test + ignore ↵Pauli Virtanen2019-12-081-1/+24
| | | | MemoryErrors
* TST: fix up issues in requires_memory decoratorPauli Virtanen2019-12-042-9/+6
| | | | Fix wrong multiplier for /proc/meminfo, and do style cleanups.
* TST: linalg: add smoke test for 64-bit blasPauli Virtanen2019-12-011-1/+3
|
* TST: add pytest machinery to specify memory requirements for testsPauli Virtanen2019-12-012-0/+74
|
* ENH: add isinf, isnan, fmin, fmax loops for datetime64, timedelta64 (#14841)Matti Picus2019-11-211-15/+27
| | | | | | | | `np.datetime('NaT')` should behave more like `float('Nan')`. Add needed infrastructure so `np.isinf(a)` and `np.isnan(a)` will run on `datetime64` and `timedelta64` dtypes. Also added specific loops for `numpy.fmin` and `numpy.fmax` that mask `NaT`.
* DOC: testing: Note handling of scalars in assert_array_equal and assert_equal.Warren Weckesser2019-11-201-5/+22
|
* assert_array_compareMaxwell Aladago2019-09-061-7/+8
|
* BUG: Fixed maximum relative error reporting in assert_allclose (gh-13802)CakeWithSteak2019-09-051-2/+7
| | | | | | Fixed maximum relative error reporting in assert_allclose: In cases where the two arrays have zeros at the same positions it will no longer report nan as the max relative error
* BUG: Fix for Python 4Hugo2019-08-261-10/+9
|
* DEP: numpy.testing.rand (#14325)Maxwell Aladago2019-08-221-18/+1
| | | * Deprecation: numpy.testing.rand
* ENH: Improve mismatch message of np.testing.assert_array_equal (#14203)Tim Hoffmann2019-08-151-2/+5
| | | | | The original message included "Mismatch: 33.3%". It's not obvious what this percentage means. This commit changes the text to "Mismatched elements: 1 / 3 (33.3%)".
* MAINT: Replace integers in places where booleans are expectedMSeifert042019-07-011-1/+1
|
* MAINT: Misc. typo fixes (#13664)luzpaz2019-05-311-2/+2
| | | | | | * DOC, MAINT: Misc. typo fixes Found via `codespell`
* BUG: special case object arrays when printing rel-, abs-errormattip2019-05-271-4/+12
|
* Merge pull request #13518 from hmaarrfk/faster_array_compareEric Wieser2019-05-121-4/+3
|\ | | | | MAINT: implement assert_array_compare without converting array to python list
| * Ensure that reduced is a 1D arrayMark Harfouche2019-05-121-1/+1
| |
| * Fixup: address eric-wieser's commentsMark Harfouche2019-05-121-5/+3
| |
| * MNT: implement assert_array_compare without converting array to python list.Mark Harfouche2019-05-091-4/+5
| |
* | DOC: testing: Mention the handling of nan in the assert_equal docstring.Warren Weckesser2019-05-051-0/+10
|/
* DOC: defaults in allclose not the same as in assert_allclose (#13395)Dieter Werthmüller2019-04-251-3/+3
| | | * DOC: defaults in allclose not the same as in assert_allclose
* MAINT: move gc.collect to function (from review)mattip2019-04-191-1/+19
|
* DEV: add pypy3 to azure CImattip2019-04-161-0/+1
|
* ENH: add "max difference" messages to np.testing.assert_array_equal (#12591)Stephan Hoyer2019-01-012-83/+122
| | | | | | | | | | | | | | | | | | | | | | Example behavior: >>> x = np.array([1, 2, 3]) >>> y = np.array([1, 2, 3.0001]) >>> np.testing.assert_allclose(x, y) AssertionError: Not equal to tolerance rtol=1e-07, atol=0 Mismatch: 33.3% Max absolute difference: 0.0001 Max relative difference: 3.33322223e-05 x: array([1, 2, 3]) y: array([1. , 2. , 3.0001]) Motivation: when writing numerical algorithms, I frequently find myself experimenting to pick the right value of `atol` and `rtol` for `np.testing.assert_allclose()`. If I make the tolerance too generous, I risk missing regressions in accuracy, so I usually try to pick the smallest values for which tests pass. This change immediately reveals appropriate values to use for these parameters, so I don't need to guess and check.
* TST, DOC: enable refguide_checkTyler Reddy2018-12-141-3/+0
| | | | | | | | * ported the refguide_check module from SciPy for usage in NumPy docstring execution/ verification; added the refguide_check run to Azure Mac OS CI * adjusted NumPy docstrings such that refguide_check passes
* MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-061-3/+2
| | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments