summaryrefslogtreecommitdiff
path: root/doc/source/reference/c-api
Commit message (Collapse)AuthorAgeFilesLines
* DOC: delete out-of-date description of ResultType algorithmNathan Goldbaum2023-05-161-20/+4
|
* DOC: clarify how inputs of PyArray_ResultType are usedNathan Goldbaum2023-05-161-5/+5
|
* DOC: Fix return type of `PyArray_EinsteinSum` (#23684)Yuki2023-04-291-1/+1
| | | | The return type `PyArray_EinsteinSum` is `PyArrayObject*`, not `PyObject*`
* Merge pull request #23648 from JulesKouatchou/feature/JulesK/docsMatti Picus2023-04-261-0/+84
|\ | | | | DOC: Example on how to use np.lib.tracemalloc_domain.
| * Change the section (on memory tracing) title to reflect its content.Jules Kouatchou2023-04-251-2/+2
| |
| * Added indentation for the sample code to be properly displayed.Jules Kouatchou2023-04-251-72/+71
| |
| * Added an example on how to trace memory in an application with NumPy related ↵Jules Kouatchou2023-04-251-0/+85
| | | | | | | | calls.
* | DOC: Clarify that defining NPY_NO_DEPRECATED_API does not determine ABI ↵Chris Brown2023-04-221-0/+4
|/ | | | | | | compatibility (#23631) Closes gh-23610 [skip ci]
* DOC: Fix incorrectly formatted roles in c-api document (#23639)yuki2023-04-211-1/+1
|
* DOC: Refactor description of `PyArray_Descr`yuki2023-04-151-77/+77
| | | | | | | | 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.
* DOC: Remove descriptions of non-existent C-types (#23584)yuki2023-04-131-16/+0
| | | Specifically PyUFuncLoopObject and PyUFuncReduceObject
* DOC: Add directive for C-type `PyArrayMapIterObject`yuki2023-04-101-2/+6
| | | | | | | `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.
* Merge pull request #23562 from F3eQnxN3RriK/doc-fix-pyufuncobjectCharles Harris2023-04-091-8/+7
|\ | | | | DOC: Fix document structure of `PyUfuncObject`
| * DOC: Fix document structure of `PyUfuncObject`yuki2023-04-081-8/+7
| | | | | | | | | | Moved (incorrectly indented) directives of the two flags back in order to fix a reference to `identity_value`.
* | Merge pull request #23560 from F3eQnxN3RriK/doc-fix-parameter-typeMatti Picus2023-04-091-1/+1
|\ \ | | | | | | DOC: Fix parameter type of `PyArray_DiscardWritebackIfCopy`
| * | DOC: Fix parameter type of `PyArray_DiscardWritebackIfCopy`yuki2023-04-081-1/+1
| |/ | | | | | | | | The type of parameter is `PyArrayObject`, not `PyObject`. ref: https://github.com/numpy/numpy/blob/main/numpy/core/include/numpy/ndarrayobject.h#L155-L167
* | DOC: Fix missing punctuation in `array.rst`yuki2023-04-071-1/+1
|/ | | | [skip ci]
* DOC: Fix description of `PyArray_DiscardWritebackIfCopy`yuki2023-04-071-1/+1
| | | | | | If my understanding of this document is correct, `PyArray_DiscardWritebackIfCopy` should be replaced with `PyArray_ResolveWritebackIfCopy`.
* DOC: Fix incorrect operators for member access in `array.rst`yuki2023-04-071-2/+2
| | | | Operators should be `->`, not `.`, for here both `obj` are pointers of C-struct.
* DOC: add missing punctuation in a C API .rst file (#23516)yuki2023-04-021-1/+1
| | | [skip ci]
* Merge pull request #23509 from F3eQnxN3RriK/doc-npy-typesCharles Harris2023-03-311-97/+97
|\ | | | | DOC: Fix a structure in `NPY_TYPES`
| * DOC: Fix a structure in `NPY_TYPES`yuki2023-03-311-97/+97
| |
* | DOC: PyArray_ArrayType doesn't existSebastian Berg2023-03-311-11/+0
| |
* | DOC: Also delete PyArray_GetArrayParamsFromObjectSebastian Berg2023-03-311-16/+0
| |
* | DOC: Remove doc for non-existing `PyArray_XDECREF_ERR`Sebastian Berg2023-03-311-12/+0
|/ | | | The macro was removed, this is just a left over.
* Merge pull request #23473 from F3eQnxN3RriK/maint-link-writebackifcopyMatti Picus2023-03-281-1/+1
|\ | | | | DOC: Fix a wrong format of reference
| * MAINT: Fix a wrong format of referenceyuki2023-03-271-1/+1
| |
* | MAINT: Fix missing asteriskyuki2023-03-271-1/+1
|/
* ENH: allow using dtype classes in array creation functionsNathan Goldbaum2023-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* DOC: Fix broken link in C-API array docs (#23117)Ross Barnowski2023-01-272-4/+6
| | | | | | Add link to array iterator example Co-authored-by: arunkumarkota <arunkumarkota@gmail.com> Co-authored-by: Arun Kota <arunkota@Aruns-iMac.local>
* DOC: fix typo in C API reference (#23092)Nathan Goldbaum2023-01-251-1/+1
| | | sizof -> sizeof
* DOC: misleading text lead to false hopeLaurenz Kremeyer2022-12-011-3/+3
|
* MAINT: npymath cleanups for isnan, isinf, isinfinite, signbit, nextafter ↵Matti Picus2022-11-281-6/+6
| | | | | | | | | (#22684) * make isnan, isinf, isfinite, signbit, nextafter aliases * fixes from review Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
* DOC: Remove traces of interrupt handling utilitiesSebastian Berg2022-11-211-11/+0
| | | | | | | | | | 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
* DOC: update libnpymath docs on its status and how to consume itRalf Gommers2022-11-061-35/+63
| | | | | | [skip azp] [skip actions] Closes gh-21431
* Merge pull request #22411 from DimitriPapadopoulos/python2_docSebastian Berg2022-10-131-8/+8
|\ | | | | DOC: Remove documentation specific to Python 2
| * DOC: Remove documentation specific to Python 2Dimitri Papadopoulos2022-10-081-8/+8
| |
* | DOC: Add reference links and switch to PyCapsuleRohit Goswami2022-10-101-1/+1
| |
* | DOC: Replace CObject with Capsule consistentlyRohit Goswami2022-10-101-1/+1
|/
* MAINT: Fix typos found by codespellDimitri Papadopoulos2022-10-071-1/+1
|
* DOC: Add C API documentation for NPY_ITER_MULTI_INDEXWill Ayd2022-09-191-0/+60
|
* DOC: Adopt changes as suggested in reviewSebastian Berg2022-07-051-2/+3
| | | | Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
* DOC: Document expectation for object array initializationSebastian Berg2022-06-231-0/+22
| | | | | | | | | | | | | 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.
* DOC: RST Titles Underline reordering (#21677)Matthias Bussonnier2022-06-082-38/+38
| | | | | | | | | | | | | | | | | | | | | * ~ 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>
* DOC: fix documentation for typedescr argument of PyArray_AsCArrayMarkus Mohrhard2022-05-141-9/+6
| | | | | The PyArray_AsCArray API does not conform to the documentation and document that the call steals a reference to the PyArray_Descr argument.
* MAINT, DOC: discard repeated wordsDimitri Papadopoulos2022-01-132-2/+2
|
* DOC: Capitalization and missing word in docsJoseph Fox-Rabinovitz2022-01-061-3/+3
| | | Followup to #20689 to include the correction made in the now-invalid #20686.
* BUG: Added check for NULL data in ufuncs (#20689)Joseph Fox-Rabinovitz2022-01-061-4/+8
| | | | | | | * BUG: Added check for NULL data in ufuncs * DOC: Made NULL refs more explicit * DOC: Added ..versionchanged:: tag
* DOC: Add PyArray_FailUnlessWriteable to the online C-API docs.warren2021-12-221-0/+11
| | | | | | | 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 (#20589)Matti Picus2021-12-182-47/+16
| | | | | | | | | | | | | * 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)