File tree Expand file tree Collapse file tree 3 files changed +15
-26
lines changed Expand file tree Collapse file tree 3 files changed +15
-26
lines changed Original file line number Diff line number Diff line change
1
+ API symbols now hidden but customizable
2
+ ---------------------------------------
3
+ NumPy now defaults to hide the API symbols it adds to allow all NumPy API
4
+ usage.
5
+ This means that by default you cannot dynamically fetch the NumPy API from
6
+ another library (this was never possible on windows).
7
+
8
+ If you are experiencing linking errors related to ``PyArray_API `` or
9
+ ``PyArray_RUNTIME_VERSION ``, you can define the
10
+ :c:macro: `NPY_API_SYMBOL_ATTRIBUTE ` to opt-out of this change.
11
+
12
+ If you are experiencing problems due to an upstream header including NumPy,
13
+ the solution is to make sure you ``#include "numpy/ndarrayobject.h" `` before
14
+ their header and import NumPy yourself based on :ref: `including-the-c-api `.
15
+
Original file line number Diff line number Diff line change @@ -221,21 +221,6 @@ using the NumPy types. You can still write cython code using the ``c.real`` and
221
221
``c.imag `` attributes (using the native typedefs), but you can no longer use
222
222
in-place operators ``c.imag += 1 `` in Cython's c++ mode.
223
223
224
- .. _api-table-visibility-change :
225
-
226
- Changes in table visibility (linking error)
227
- -------------------------------------------
228
- If you are experiencing linking errors related to ``PyArray_API `` or
229
- ``PyArray_RUNTIME_VERSION ``, NumPy changed the default visibility to hidden
230
- (which was always the case on windows).
231
- You can use the :c:macro: `NPY_API_SYMBOL_ATTRIBUTE ` to opt-out of this change.
232
- However, we generally discourage linking across project boundaries because
233
- it breaks NumPy compatibility checks.
234
-
235
- If you are experiencing problems due to an upstream header including NumPy,
236
- the solution is to make sure you ``#include "numpy/ndarrayobject.h" `` before
237
- their header and import NumPy yourself based on :ref: `including-the-c-api `.
238
-
239
224
240
225
Changes to namespaces
241
226
=====================
Original file line number Diff line number Diff line change @@ -655,17 +655,6 @@ Please see :ref:`migration_c_descr` for more information.
655
655
656
656
(`gh-25943 <https://github.com/numpy/numpy/pull/25943 >`__)
657
657
658
- API symbols now hidden but customizable
659
- ---------------------------------------
660
- NumPy now defaults to hide the API symbols it adds to allow all NumPy API
661
- usage.
662
- This means that by default you cannot dynamically fetch the NumPy API from
663
- another library (this was never possible on windows).
664
- Please see :ref: `api-table-visibility-change ` and the new
665
- :c:macro: `NPY_API_SYMBOL_ATTRIBUTE ` which allows to customize/revert this.
666
-
667
- (`gh-26103 <https://github.com/numpy/numpy/pull/26103 >`__)
668
-
669
658
670
659
NumPy 2.0 C API removals
671
660
========================
You can’t perform that action at this time.
0 commit comments