| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
The return type `PyArray_EinsteinSum` is `PyArrayObject*`, not
`PyObject*`
|
|\
| |
| | |
DOC: Example on how to use np.lib.tracemalloc_domain.
|
| | |
|
| | |
|
| |
| |
| |
| | |
calls.
|
|/
|
|
|
|
|
| |
compatibility (#23631)
Closes gh-23610
[skip ci]
|
| |
|
|
|
|
|
|
|
|
| |
The [PyArray_Descr
documentation](https://numpy.org/devdocs/reference/c-api/types-and-structures.html#c.PyArray_Descr)
is indented incorrectly and has duplicated `alignment` entry in the wrong place.
In order to fix the document structure while keeping the internal
links, moved the flags directive after the `PyArray_Descr` description.
|
|
|
| |
Specifically PyUFuncLoopObject and PyUFuncReduceObject
|
|
|
|
|
|
|
| |
`PyArrayMapIterObject` is referenced from other documents (e.g.
https://numpy.org/devdocs/reference/c-api/array.html#c.PyArray_MapIterSwapAxes),
however it has no target and causes reference warning (see gh-13114).
Therefore added directive `.. c:type:: PyArrayMapIterObject` to fix these references.
|
|\
| |
| | |
DOC: Fix document structure of `PyUfuncObject`
|
| |
| |
| |
| |
| | |
Moved (incorrectly indented) directives of the two flags back
in order to fix a reference to `identity_value`.
|
|\ \
| | |
| | | |
DOC: Fix parameter type of `PyArray_DiscardWritebackIfCopy`
|
| |/
| |
| |
| |
| | |
The type of parameter is `PyArrayObject`, not `PyObject`.
ref: https://github.com/numpy/numpy/blob/main/numpy/core/include/numpy/ndarrayobject.h#L155-L167
|
|/
|
|
| |
[skip ci]
|
|
|
|
|
|
| |
If my understanding of this document is correct,
`PyArray_DiscardWritebackIfCopy` should be replaced with
`PyArray_ResolveWritebackIfCopy`.
|
|
|
|
| |
Operators should be `->`, not `.`, for here both `obj` are pointers of C-struct.
|
|
|
| |
[skip ci]
|
|\
| |
| | |
DOC: Fix a structure in `NPY_TYPES`
|
| | |
|
| | |
|
| | |
|
|/
|
|
| |
The macro was removed, this is just a left over.
|
|\
| |
| | |
DOC: Fix a wrong format of reference
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This enables writing np.array(some_object, dtype=type(np.dtype('i'))). This
is a follow-on from https://github.com/numpy/numpy/pull/23154, see that PR
for more details.
I had to add a new include to `ctors.h` to bring in the definition of the
`npy_dtype_info` struct. Since `ctors.h` is included in many other files inside
numpy, I found that I needed to modify fewer includes across numpy if I moved
the definition of `npy_dtype_info` to `common.h` from `descriptor.h`. The new
includes of `common.h` are needed to support later includes of `ctors.h` in
those files. If anyone has an alternate place to put `npy_dtype_info` that would
cause less churn of includes I'd love to hear about it.
I spent a bunch of time tweaking the reference counts. I'm reasonably confident
this is correct but not 100%, an additional careful pass over the reference
count logic from a reviewer would be very appreciated.
I could have made `_PyArray_FromAny` and `_PyArray_CheckFromAny` take just a
`npy_dtype_info` struct, but I found it made the reference count logic more
complicated, since `PyArray_FromAny` and `PyArray_CheckFromAny` steal the
reference to the descriptor they are passed and I needed to conserve that
behavior. Also both functions support passing in a `NULL` pointer for the
descriptor and I needed to maintain that behavior as well.
The change to `ucsnarrow.h` fixes a preexisting conflict with the prototype
in `ucsnarrow.c` that triggered a compiler error while I was working on this.
|
|
|
|
|
|
| |
Add link to array iterator example
Co-authored-by: arunkumarkota <arunkumarkota@gmail.com>
Co-authored-by: Arun Kota <arunkota@Aruns-iMac.local>
|
|
|
| |
sizof -> sizeof
|
| |
|
|
|
|
|
|
|
|
|
| |
(#22684)
* make isnan, isinf, isfinite, signbit, nextafter aliases
* fixes from review
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
|
|
|
|
|
|
|
|
|
|
| |
We do not use these in NumPy anymore, and at this point the whole
`npy_interrupt.h` header only exists in case someone is using it
out there.
We may wish to just remove it at some point, vendoring the header is
simple enough after all (and no known downstream usage exists).
See also gh-7545, gh-12541
|
|
|
|
|
|
| |
[skip azp] [skip actions]
Closes gh-21431
|
|\
| |
| | |
DOC: Remove documentation specific to Python 2
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This documents (and thus semi-establishes) that we try to make
sure that any array that may be *read* is fully initialized with
proper Python objects (not NULL).
However, try to write in a way that clearly says that users are not
allowed to rely on this. I somewhat suspect there are more code
paths where we may to fail fully initializing object arrays...
It does promise to regard such things as bugs, if we do not want
that, I am happy to just tell users to expect NULLs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ~ not ^
* = skipped for -
* swap - and = underline in files they are swapped
* * to = in header underline
* - to = and * to - for consitency
* A few more change * -> ~
* use ~ instead of +
* DOC: Fixup `c-api/array.rst` with further ^ with ~ replacement
There is still a fourth level here, which remains using "
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
|
|
|
|
| |
The PyArray_AsCArray API does not conform to the documentation and
document that the call steals a reference to the PyArray_Descr argument.
|
| |
|
|
|
| |
Followup to #20689 to include the correction made in the now-invalid #20686.
|
|
|
|
|
|
|
| |
* BUG: Added check for NULL data in ufuncs
* DOC: Made NULL refs more explicit
* DOC: Added ..versionchanged:: tag
|
|
|
|
|
|
|
| |
The text was copy-edited a bit, and the comments in the C file
were updated to match the documentation in the .rst file.
Closes gh-20623.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* DEP: remove NPY_ARRAY_UPDATEIFCOPY, deprecated in 1.14
* remove more UPDATEIFCOPY
* typo: add missing comma
* remove a few more UPDATEIFCOPY
* Add release note
* remove UPDATEIFCOPY from comment (from review)
|