| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
The return type `PyArray_EinsteinSum` is `PyArrayObject*`, not
`PyObject*`
|
|\
| |
| | |
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.
|
| |
|
| |
|
|
|
|
| |
The macro was removed, this is just a left over.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| | |
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.
|
|
|
|
|
|
|
| |
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)
|
|\
| |
| | |
DOC: Two small changes in array.rst:
|
| |
| |
| |
| |
| |
| | |
* Include the return values of `PyArray_RegisterCanCast`
in the description.
* Correct the documentation of `PyArray_Scalar`.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Builds on gh-20194. Fixes breakage of SciPy in https://github.com/scipy/scipy/issues/14917
At some point we could flip the default to "warn" instead of "no warning"
* make warning conditional on NUMPY_WARN_IF_NO_MEM_POLICY
* add test, fix example code
* fixes from review
* typo
|
| |
|
| |
|
|
|
| |
Co-authored-by: Melissa Weber Mendonça <melissawm@gmail.com>
|
|
|
|
|
|
|
|
| |
1. PyArray_CopyObject
2. PyArray_MapIterArray
3. PyArray_MapIterSwapAxes
4. PyArray_MapIterNext
5. PyArray_MapIterArrayCopyIfOverlap
|
| |
|
| |
|
|
|
| |
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
|
|
|
| |
PyArray_FinalizeFunc.
|
| |
|
| |
|
|
|
|
|
|
| |
Document that NeighborhoodIterator will point to the begining
of the data instead of the position pointed by iter on creation
in the special case where data is contiguous.
|
| |
|
|
|
| |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
| |
|
| |
|
|\
| |
| | |
DOC: Fix the references for ``__array_*__``
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
DOC: Add the entry for ``NPY_FEATURE_VERSION``
|
| | |
|
| | |
|