summaryrefslogtreecommitdiff
path: root/numpy/tests
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: move numpy/random/examples -> numpy/random/_examplesmattip2019-11-191-1/+0
|
* API: restructure and document numpy.random C-API (#14604)Matti Picus2019-11-191-1/+2
| | | | | | | | | | | | | | | | * API: restructure and document numpy.random C-API * DOC: fix bad reference * API: ship, document, and start to test numpy.random C-API examples * API, DOC, TST: fix tests, refactor documentation to include snippets * BUILD: move public headers to numpy/core/include/numpy/random * TST: ignore DeprecationWarnings in setuptools and numba * DOC: document the C-API as used from Cython
* API: move bit_generator and generator to be privatemattip2019-10-111-2/+0
|
* API: make BitGenerators privatemattip2019-10-111-4/+0
|
* API: rename common, bounded_integers -> _common, _bounded_integers; cleanupmattip2019-10-111-2/+0
|
* MAINT: remove unused numpy/f2py/info.py fileRalf Gommers2019-09-221-1/+0
|
* DOC: clean up numpy.lib docstring, remove numpy/lib/info.pyRalf Gommers2019-09-221-1/+0
|
* DOC: add up-to-date numpy.linalg docstring, remove info.py fileRalf Gommers2019-09-221-1/+0
| | | | | | Docstring isn't used to render the html docs, that is controlled by ``routines.linalg.rst``. Still good to bring the contents of function listings of the module docstring in line with that file.
* MAINT: remove stray numpy/random/info.py fileRalf Gommers2019-09-221-1/+0
|
* DOC: add a numpy.distutils module docstring, remove info.py fileRalf Gommers2019-09-221-1/+0
|
* DOC: remove numpy/core/info.py and incomplete docstring for core.Ralf Gommers2019-09-221-1/+0
|
* DEP: remove deprecate (and private) numpy.testing submodules.Ralf Gommers2019-09-211-3/+0
| | | | | | | | | | | Removes these files that were deprecated since 1.15.0: - numpy/testing/decorators.py - numpy/testing/noseclasses.py - numpy/testing/nosetester.py This also resolves a failure in the recently introduced tests in `test_public_api.py` (see gh-14454). Closes gh-14566
* TST: add test to check that (semi-)public API modules can be importedRalf Gommers2019-09-191-17/+68
| | | | | Also remove `numpy.ma.version.py`, it was not importable and served no purpose.
* TST: remove random.entropy from public API test, it was removed in gh-14498Ralf Gommers2019-09-191-1/+0
|
* TST: make xfailed test for modules in public API pass.Ralf Gommers2019-09-191-3/+35
|
* TST: add comment on public/semi-private modules.Ralf Gommers2019-09-191-21/+31
| | | | Also address other review comments.
* MAINT: add missing 'Arrayterator' to `numpy.lib.__all__`Ralf Gommers2019-09-191-5/+6
| | | | | | | Also finish the TODO about figuring out which np.lib.<submodule>'s are public. This is a giant mess ...
* TST: add details to the public modules test about how to check public-nessRalf Gommers2019-09-191-0/+15
|
* TST: add `core/generate_numpy_api.py` to private-but-present modulesRalf Gommers2019-09-191-0/+1
|
* TST: add test to prevent new public-looking modules being addedRalf Gommers2019-09-191-1/+288
|
* MAINT: Lazy import testing on python >=3.7 (#14097)Mark Harfouche2019-08-221-0/+23
| | | | | On new python versions, the module level `__getattr__` can be used to import testing and Tester only when needed (at no speed cost, except for the first time import). Since most users never use testing, this avoids an expensive import.
* MAINT: Fix errors seen on new python 3.8Sebastian Berg2019-05-211-1/+1
| | | | | | | | | | | | | | One of this is a small issue exposed by new warnings, the others are simply adapting our test suit to stricter integer coercion rules (avoiding float -> int conversions). The last one is that we assumed pickle protocol 5 would be in 3.8. It is not yet included in the alpha releases at least. It seems not necessary for the numpy test suit to check whether it is available based on the python version so removing that test. (Also testing if the pickle5 module works seems unnecessary.) Closes gh-13412
* DOC: Added maximum_sctype to documentationJoseph Fox-Rabinovitz2019-02-271-1/+0
|
* MAINT: Move pickle import to numpy.compatCharles Harris2019-02-211-1/+1
| | | | | | | The pickle module was being imported from numpy.core.numeric. It was defined there in order to use pickle5 when available in Python3 and cpickle in Python2. The numpy.compat module seems a better place for that.
* ENH: Add np.ctypeslib.as_ctypes_type(dtype), improve `np.ctypeslib.as_ctypes`Eric Wieser2019-01-131-0/+92
| | | | | | | This also improves `np.ctypeslib.as_ctypes` to support more types of array: * non-native endianness * structured arrays with non-overlapping fields * booleans
* BUG,TST: Remove the misguided `run_command` that wraps subprocess in a ↵Eric Wieser2018-12-181-71/+16
| | | | | | broken way Also switches to using a parametrized test, for better error messages
* DEV: add test for 'python -mnumpy.f2py'mattip2018-12-181-0/+5
|
* BUG: fix segfault in ctypeslib with obj being collectedAnthony Sottile2018-12-161-0/+13
| | | | | - https://bugs.python.org/issue35507 - https://stackoverflow.com/q/53757856/812183
* MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-061-1/+1
| | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* BUG: test, fix NPY_VISIBILITY_HIDDEN on gcc, which becomes NPY_NO_EXPORTmattip2018-11-221-1/+13
|
* BUG/ENH: Fix use of ndpointer in return valuesEric Wieser2018-11-211-5/+70
| | | | | | | | | | | This: * fixes a regression in 1.15, where it became impossible to set the return value of a cdll function to an ndpointer. * removes ndpointer.__array_interface__, which was being ignored anyway in favor of the PEP3118 buffer protocol * adds `ndpointer.contents` to recover the lost functionality, while staying in line with the ctypes behavior * removes another instance of `descr`, which enables overlapping fields to be returned from C functions (such as unions). * Fixes a long-term bug where using ndpointer as a return type without specifying both type and dtype would produce an object array containing a single `ndpointer`. Now the ndpointer is returned directly. This relates to gh-12421, and likely fixes toinsson/pyrealsense#82
* BUG: Fix inconsistent cache keying in ndpointerEric Wieser2018-11-191-3/+8
| | | | | | | | Fixes an alarming bug introduced in gh-7311 (1.12) where the following is true np.ctypeslib.ndpointer(ndim=2) is np.ctypeslib.ndpointer(shape=2) Rework of gh-11536
* MAINT: fix tests on Python 2Stephan Hoyer2018-11-141-0/+6
|
* MAINT: separate builtins and undocumented functionsStephan Hoyer2018-11-131-8/+12
|
* DOC: add a comment explaining why we use normal assertStephan Hoyer2018-11-131-0/+2
|
* ENH: set correct __module__ for objects in numpy's public APIStephan Hoyer2018-11-131-0/+65
| | | | | | | | | | | | | Fixes GH-12271 Tests verify that everything in ``dir(numpy)`` either has ``__module__`` set to ``'numpy'``, or appears in an explicit whitelist of undocumented functions and exported bulitins. These should eventually be documented or removed. I also identified a handful of functions for which I had accidentally not setup dispatch for with ``__array_function__`` before, because they were listed under "ndarray methods" in ``_add_newdocs.py``. I guess that should be a lesson in trusting code comments :).
* MAINT, TST import pickle from numpy.core.numericPierre Glaser2018-10-101-3/+5
| | | | | | | | All imports of pickle from numpy modules are now done this way: >>> from numpy.core.numeric import pickle Also, some loops on protocol numbers are added over pickle tests that were not caught from #12090
* removing warningsEric Schles2018-09-251-1/+0
|
* updating test file to ignore the failureEric Schles2018-09-251-10/+4
|
* updating f2py to ensure that at least f2py base exists, and doesn't error ↵Eric Schles2018-09-251-3/+11
| | | | out if multiple do not
* Merge pull request #10915 from mattip/implement-nep-0015Charles Harris2018-08-311-4/+4
|\ | | | | ENH: implement nep 0015: merge multiarray and umath
| * MAINT: merge umath, multiarray into _multiarray, add python wrappersmattip2018-08-211-4/+4
| |
* | ENH: Use entry_points to install the f2py scripts.Charles Harris2018-08-231-20/+25
|/ | | | | | | | | | | | | | | | | | | | | This adds entry_points for the f2py scripts. The installed scripts differ between Windows and other environments. * On Windows, the only script installed is 'f2py'. This works well in that environment because each Python version is installed in its own directory, making it easy to keep the differing script versions separate. * Otherwise, three scripts are installed, 'f2py', 'f2py' + 'minor', and 'f2py' + 'major.minor'. For instance, if Numpy is installed by Python 2.7, then the installed scripts will be named 'f2py', 'f2py2', and 'f2py2.7'. That naming scheme is used for back compatibility, and also so that more than one Python version can be dealt with in a way common to many Linux distros. Note that 'f2py' will always point to the latest install and 'f2py(2|3)' to the latest Python (2|3) install The script tests have been modified to check for the new environment and the code previously used to install the scripts has been removed.
* MAINT: Improve memory usage in PEP3118 format parsingEric Wieser2018-07-231-0/+20
| | | | | | | Previously a local `Stream` class would be defined every time a format needed parsing. Classes in cpython create reference cycles, which create load on the GC. This may or may not resolve gh-6511
* Merge pull request #10970 from eric-wieser/cut-down-ctypeslibCharles Harris2018-06-071-10/+67
|\ | | | | WIP: Remove fragile use of __array_interface__ in ctypeslib.as_array
| * BUG: Remove fragile use of __array_interface__ in ctypeslib.as_arrayEric Wieser2018-05-261-5/+43
| | | | | | | | | | | | | | | | | | | | Everything behaves a lot better if we let the array constructor handle it, which will use the ctypes PEP3118 support. Bugs this fixes: * Stale state being attached to pointer objects (fixes gh-2671, closes gh-6214) * Weird failure modes on structured arrays (fixes-10978) * A regression in gh-10882 (fixes gh-10968)
| * MAINT: Pull repeated decorators up to their containing classEric Wieser2018-04-241-12/+9
| |
| * MAINT: Use assert_equalEric Wieser2018-04-241-4/+4
| |
| * TST: Add tests for numpy.ctypeslib.as_arraytynn2018-04-241-2/+24
| |
* | TST: Ignore PendingDeprecationWarning in matrixlib tests.Marten van Kerkwijk2018-05-291-0/+8
|/