| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
BUG: have _array_from_buffer_3118 correctly handle errors
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes gh-6741
If an object claims to support the PEP3118 buffer protocol, then any mistakes in the implementation should be raised as errors, rather than falling back on other approaches.
This has some behavior changes:
* np.array(mem_view_33d) now gives a more useful error message than "memoryview: unsupported format <B"
* np.array(ctypes_pointer) now errors rather than creating an object array containing a single pointer
Also adds support for 32-dimensional buffers, where previously the max was 31-dimensional.
|
|\ \
| | |
| | | |
BUG: test, fix PyArray_DiscardWritebackIfCopy refcount issue and docu…
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
BUG: 'style' arg to array2string broken in legacy mode
|
| | | |
| | | |
| | | |
| | | | |
Fixes #10934
|
| | | | |
|
| |/ /
|/| | |
|
|\ \ \
| |/ /
|/| | |
ENH: Nditer as context manager
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
DOC: clear up warnings, fix matplotlib plot
|
| | | | |
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
BUG: Return NULL from PyInit_* when exception is raised
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I don't think this is documented anywhere, but I'm pretty sure module init
functions should return NULL in order to communicate that an exception
occurred during initialization (as is the standard Python/C API convention).
It's clear from the CPython code
[here](https://github.com/python/cpython/blob/master/Python/importdl.c#L162)
that if you don't return NULL, the exception is swallowed and replaced with the
message "initialization of %s raised unreported exception".
Admittedly, this is only useful for people porting Numpy to new platforms where
it is helpful to know where module initialization is failing, but it can't hurt.
|
| |/ /
|/| |
| | |
| | | |
from tuple descr
|
|\ \ \
| | | |
| | | | |
DOC: rework documents and silence warnings during sphinx build
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
DOC: Cross-reference full/full_like in a few "See Also" sections.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
While teaching numpy I was asked the best way to create an array of nan,
and `np.full` seem not be cross linked from many places; In particular
in the documentation of `zeros` and `ones` seam like obvious candidates
to add them.
Reorder all the see-also to be
- empty_like
- ones_like
- zero_like
- full_like
- empty
- ones
- zeros
- full
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
ENH: umath: don't make temporary copies for in-place accumulation
|
| | | | |
| | | | |
| | | | |
| | | | | |
Do the operation `ufunc.accumulate(x, out=x)` without temporary copies.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
ENH: Add object loops to the comparison ufuncs
|
| | | | |
| | | | |
| | | | |
| | | | | |
This helps solve RobotLocomotion/drake#8315
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
BUG: core: fix NPY_TITLE_KEY macro on pypy
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
On Pypy, dictionary keys do not necessarily preserve object identity.
This however was assumed by the NPY_TITLE_KEY macro, which relies on
descriptor.c:568 using the same 'title' object both as a dictionary key
as an entry in the tuple inserted.
Since the items in the field dict are unique, value identity is however
sufficient for the NPY_TITLE_KEY macro. On PyPy, fix the macro by
comparing values instead.
|
|\ \ \ \
| |_|/ /
|/| | | |
BUG: fix wrong inplace vectorization on overlapping arguments
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The input arguments to inplace operations can overlap for accumulate
operatation where out[i+1] = in[i] + out[i]
This breaks the no loop carried dependency assumptions the compiler has
due to the ivdep pragma that is required for GCC to vectorize the loop.
Currently this does not harm as accumulate operations are out of place,
but future enhancements may change that.
Fix this by verifying the arguments do not overlap within a hardware
vector size.
As we do not know the vector size of future machines use an extremely
large value of 1024 bytes (commodity hardware currently has at most 64
bytes)
|
|\ \ \ \
| | | | |
| | | | | |
MAINT: Remove yield tests
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
Just replaces yields with normal function calls. Some of these tests
could be parametrized with a bit of reorganization, however, the
comments in the tests would have been lost and they seemed worth
keeping.
|
|\ \ \ \
| |/ / /
|/| | | |
DEP: Issue deprecation warnings for some imports.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The following modules have been moved or renamed and should not be
imported. This adds shim modules for the old names that issue a
DeprecationWarning on import.
* numpy/core/umath_tests.py
* numpy/testing/decorators.py
* numpy/testing/noseclasses.py
* numpy/testing/nosetester.py
* numpy/testing/utils.py
Closes #10845.
|
|/ / /
| | |
| | |
| | |
| | | |
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
|
|\ \ \
| | | |
| | | | |
TST: Switch to pytest
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Numpy can now be tested using the standard
`python -c"import numpy; numpy.test()"`
construct.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \ \ \
| | | | |
| | | | | |
DEP: Deprecate np.sum(generator)
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fixes #10652
Introduced in a13aad3ac33b629f3e696b4d4d5dbf4b5605d567
|
|\ \ \ \ \
| | | | | |
| | | | | | |
BUG: np.squeeze() now respects older API axis expectation
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* Fixes Issue #10779 by removing the interception of
an otherwise normal Exception when an object implemented
with the expectation that squeeze() does not accept an
axis argument receives an axis argument
* Added unit tests that enforce respect for the old API
expectation in objects, and ensure that silent success
(or forced usage of the new API on objects) is no longer
the case
* Updated compatibility notes to explain this change
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
BUG: floating types should override tp_print
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes #10753
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
DOC: Add remarks about array vs scalar output to every ufunc
|
| | |_|_|_|/ /
| |/| | | | |
| | | | | | |
| | | | | | | |
Some ufuncs already mentioned this, but it seems sensible for all of them to describe it in exactly the same way.
|