| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(gh-15463)
xref gh-14778
As pointed out in the comment by @jamesthomasgriffin, we did not include a pxd file to expose the distribution functions documented in the random c-api. This PR adds a c_distributions.pxd file that exposes them.
Squashed commits:
* BUG: add missing c_distributions.pxd to enable cython use of random C-API
* ENH, TST: add npyrandom library like npymath, test cython use of it
* BUG: actually prefix f-string with f
* MAINT: fixes from review, add _bit_generato_bit_generator.pxd
* STY: fixes from review
* BLD: don't use nprandom library for mtrand legacy build
* TST: WindowsPath cannot be used in subprocess's list2cmdline
* MAINT, API: move _bit_generator to bit_generator
* DOC: add release note about moving bit_generator
* DOC, MAINT: fixes from review
* MAINT: redo dtype determination from review
|
|
|
|
|
|
|
| |
* 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)
|
|
|
|
|
| |
Modified __dir__() to remove duplicate "Tester/Testing" attribute. Also added a test to verify this.
Closes gh-15383
|
|\
| |
| | |
DEP: add PendingDeprecation to matlib.py funky namespace
|
| | |
|
|/
|
|
|
|
|
| |
This replaces basestring with str except in
- tools/npy_tempita/
- numpy/compat/py3k.py
|
| |
|
| |
|
|\
| |
| |
| | |
remove-numpy.distutils.compat
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
On Python 3, int_asbuffer throws NotImplementedError and goes unused
internally.
Fixes #12425
|
| |
| |
| |
| |
| | |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|/
|
|
| |
`get_exception` has no callers as of this commit's parent, and is hard to argue as public API given the only docstring in the file refers to "inside distutils".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Also remove `numpy.ma.version.py`, it was not importable and served
no purpose.
|
| |
|
| |
|
|
|
|
| |
Also address other review comments.
|
|
|
|
|
|
|
| |
Also finish the TODO about figuring out which np.lib.<submodule>'s
are public.
This is a giant mess ...
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This also improves `np.ctypeslib.as_ctypes` to support more types of array:
* non-native endianness
* structured arrays with non-overlapping fields
* booleans
|
|
|
|
|
|
| |
broken way
Also switches to using a parametrized test, for better error messages
|
| |
|
|
|
|
|
| |
- https://bugs.python.org/issue35507
- https://stackoverflow.com/q/53757856/812183
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#12448)
* Review F401,F841,F842 flake8 errors (unused variables, imports)
* Review comments
* More tests in test_installed_npymath_ini
* Review comments
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 :).
|
|
|
|
|
|
|
|
| |
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
|