summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* TST: Update modules `test` to PytestTester.Charles Harris2018-04-0412-35/+44
| | | | | | | | Numpy can now be tested using the standard `python -c"import numpy; numpy.test()"` construct.
* TST: Switch to using pytest markersCharles Harris2018-04-0456-458/+535
| | | | | | | | | | | 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.
* TST: Update pytest.ini and PytestTesterCharles Harris2018-04-041-11/+30
| | | | | | | | * Make PytestTester callable. * Rename 'timer' to 'durations', corresponding with pytest. * Offset 'verbose', no entry is now '-q'. * Move some `ignore` warnings into PytestTester so that they affect releases, not just develop.
* Merge pull request #10827 from charris/create-pytesttesterCharles Harris2018-04-0111-10/+175
|\ | | | | ENH: Add tester for pytest.
| * ENH: Add tester for pytest.Charles Harris2018-03-311-0/+175
| | | | | | | | | | | | [ci skip] This is not used yet, but has been tested with temporary changes and works.
| * MAINT: Remove "bench" from testing modules `__init__`s.Charles Harris2018-03-3110-10/+0
| | | | | | | | | | The "bench" testing with the old bench files is no longer supported. These days we use `runtests.py` and `asv`.
* | MAINT: Fix hard tab.Charles Harris2018-04-011-1/+1
| |
* | ENH: Add support for the 64-bit RISC-V architectureDavid Abdurachmanov2018-04-012-1/+5
|/ | | | | | | | | | | | RISC-V (pronounced "RISC Five") is an open source instruction set architecture (ISA). The 64-bit version may run the Linux kernel and the usual stack of applications on top of it, including Python. This patch adds support for riscv64 to Numpy. With it the full testsuite passes for both Python 2.7 and 3.6, with the only exception of test_float (test_numeric.TestBoolCmp). See #8213 for details. Closes: #8213
* Merge pull request #10832 from orestisf1993/issue-10810Stephan Hoyer2018-03-312-1/+8
|\ | | | | ENH: datetime64: support AC dates starting with '+'
| * ENH: datetime64: support AC dates starting with '+'Orestis Floros2018-03-312-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Numpy allows negatives signs but throws a value error when parsing datetime strings starting with '+': >>> np.datetime64('+1000-01-01T00:00:00Z') ValueError: Error parsing datetime string "+1000-01-01T00:00:00Z" at position 0 Since the default is positive years, we just need to skip the '+' character. Fixes #10810.
* | Merge pull request #10786 from lakshayg/stablesortJulian Taylor2018-03-315-9/+23
|\ \ | |/ |/| ENH: Add "stablesort" option to inp.sort as an alias for "mergesort".
| * Remove NPY_STABLESORT enumLakshay Garg2018-03-295-15/+15
| |
| * add test for stable sortLakshay Garg2018-03-251-0/+6
| |
| * add stablesort in np.sort and point to mergesortLakshay Garg2018-03-237-10/+18
| | | | | | | | Closes #10784
* | Merge pull request #10830 from charris/fix-testing-warningsRalf Gommers2018-03-303-6/+6
|\ \ | | | | | | BUG: Fix obvious warning bugs.
| * | BUG: Fix obvious warning bugs.Charles Harris2018-03-303-6/+6
| | | | | | | | | | | | The warning type is the second, not the first, argument.
* | | DOC: Fix minor typosluz.paz2018-03-309-10/+10
|/ / | | | | Found via `codespell -q 3 -I ../numpy-whitelist.txt`
* | BUG: fix obvious mistake in testing/decorators warning.Ralf Gommers2018-03-291-2/+2
| |
* | Merge pull request #10812 from charris/rearrange-testing-filesCharles Harris2018-03-2913-13/+32
|\ \ | | | | | | MAINT: Rearrange `numpy/testing` files
| * | MAINT: Warn when importing numpy.testing.<module>.Charles Harris2018-03-294-4/+18
| | | | | | | | | | | | | | | Downstream projects were importing directly from the testing modules rather than from testing. Discourage this.
| * | MAINT: Rearrange numpy/testing files.Charles Harris2018-03-2913-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is to prepare for the switch to pytest. * Rename `numpy/testing/nose_tools` to `numpy/testing/_private`. * Redirect imports as needed. * Copy `_testutils.py` from scipy to `numpy/testing/_private`. * Rename `_testutils.py` to `_pytester.py` and remove unneeded bits.
* | | Merge pull request #10619 from eric-wieser/fix-notmasked_contiguousMarten van Kerkwijk2018-03-272-28/+64
|\ \ \ | | | | | | | | BUG: np.ma.flatnotmasked_contiguous behaves differently on mask=nomask and mask=zeros
| * | | BUG: Always return a list from np.ma.flatnotmasked_contiguousEric Wieser2018-03-252-17/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the input, this would return: * A single slice, if mask=nomask * A list of slices, if mask is an array * None, if mask is fully masked The documented return value is a list, and all downstream callers of this function end up having to correct for it not being one. This affects the result of np.ma.notmasked_contiguous, which also did not document these unusual return values.
| * | | TST: simplify test of notmasked_contiguousEric Wieser2018-03-251-13/+22
| |/ /
* | | Merge pull request #10795 from eric-wieser/einsum-output-spacesMarten van Kerkwijk2018-03-262-10/+28
|\ \ \ | | | | | | | | BUG: Allow spaces in output string of einsum
| * | | BUG: Allow spaces in output string of einsumEric Wieser2018-03-252-10/+28
| |/ / | | | | | | | | | | | | | | | Also produce more useful error messages Fixes gh-10794
* | | Merge pull request #10798 from jaimefrio/einsum_mappingEric Wieser2018-03-262-4/+9
|\ \ \ | | | | | | | | BUG: error checking before mapping of einsum axes.
| * | | BUG: Incorrect mapping of einsum axes.Jaime Fernandez2018-03-262-4/+9
| |/ /
* | | Merge pull request #10774 from mdboom/fix-sqrt-min-for-no-long-doubleAllan Haldane2018-03-251-0/+4
|\ \ \ | |/ / |/| | BUG: Fix SQRT_MIN for platforms with 8-byte long double
| * | Fix SQRT_MIN for platforms with 8-byte long doubleMichael Droettboom2018-03-201-0/+4
| | |
* | | BUG: Provide correct format in Py_buffer for scalars (#10564)Jeff VanOss2018-03-244-46/+201
| | | | | | | | | | | | Unifies scalar and ndarray pep3118 format string generation
* | | Merge pull request #10790 from charris/pytest-prepCharles Harris2018-03-2423-239/+346
|\ \ \ | | | | | | | | TST: Various fixes prior to switching to pytest
| * | | TST: Add numpy/compat/testsCharles Harris2018-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | These tests were not included in the `setup.py` file and consequently not available in the installed numpy for testing.
| * | | TST: Do not import functions beginning `test_`.Charles Harris2018-03-243-76/+95
| | | | | | | | | | | | | | | | Avoids pytest collection time warnings.
| * | | TST: Rename some compiled c test modulesCharles Harris2018-03-2418-64/+64
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | TST: Remove nose dependence of locale tests.Charles Harris2018-03-244-93/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add class CommaDecimalPointLocale that can be used for testing in a LC_NUMERIC locale where the decimal point is a comma. It functions either as a context manager or as a base class with setup and teardown methods. Both uses raise SkipTest when no suitable locale is available.
| * | | TST: Remove some nose dependences in utils.pyCharles Harris2018-03-231-7/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `assert_raises` and `assert_raises_regex` testing utilities were being imported from nose, which in turn took them from unittest `assertRaises` and `assertRaisesRegex`. We takeover the nose procedure here so that these commonly used utilities no longer have a nose dependence. The `raises` decorator continues to have a nose dependency, but that only shows up when used, and NumPy does not use it. Document that and otherwise leave it be.
* | | | Fixed author name in reference to bookChloeColeongco2018-03-221-1/+1
| |_|/ |/| | | | | ('van' vs 'Van')
* | | BUG: test, fix for missing flags['WRITEBACKIFCOPY'] keymattip2018-03-222-1/+3
|/ /
* | Merge pull request #10777 from charris/prep-for-pytestCharles Harris2018-03-217-223/+181
|\ \ | | | | | | MAINT: Remove use of unittest in NumPy tests.
| * | MAINT: Remove use of unittest in NumPy tests.xoviat2018-03-217-223/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Use dummy_threading on platforms that don't support threading (#10773)Michael Droettboom2018-03-201-1/+4
| |/ |/|
* | Merge pull request #10766 from eric-wieser/remove-dead-codeCharles Harris2018-03-191-49/+0
|\ \ | |/ |/| MAINT: Remove the unused scalarmath getters for fmod and sqrt
| * MAINT: Remove the unused scalarmath getters for fmod and sqrtEric Wieser2018-03-191-49/+0
| |
* | Merge pull request #10740 from charris/add-python-3.7-testsCharles Harris2018-03-199-37/+197
|\ \ | |/ |/| MAINT, TST: Fixes for Python 3.7
| * MAINT: Fix Python 3 deprecated C-API useCharles Harris2018-03-197-23/+164
| | | | | | | | | | | | | | The PyObject_AsWriteBuffer and PyObject_AsReadBuffer functions are deprecated in Python 3. Replace them with the Py_buffer based replacements. Much of that was done prior to this patch, but some uses were missed.
| * MAINT: Fix test_utils.py for Python 3.7.Charles Harris2018-03-191-14/+29
| | | | | | | | | | | | The contents of the module warnings registries was made more module specific in Python 3.7 and consequently the tests of the context managers clear_and_catch_warnings and suppress_warnings need updating.
| * MAINT: Fix char* variable in arr_add_docstring for Python 3.7Charles Harris2018-03-151-0/+4
| | | | | | | | | | | | In Python 3.7 the return type of PyUnicode_AsUTF8 has changed from `char *` to `const char *` and the variable the return is stored in needs to match.
* | Merge pull request #10755 from eric-wieser/reduce-histogram-docsCharles Harris2018-03-161-108/+76
|\ \ | | | | | | DOC: Move bin estimator documentation from `histogram` to `histogram_bin_edges`
| * | MAINT: The histogram_bin_edges function needs a raw docstring.Charles Harris2018-03-161-1/+1
| | |