diff --git a/.github/workflows/numpy.yml b/.github/workflows/numpy.yml
index 38ebf4c138f..1e4be0cc30e 100644
--- a/.github/workflows/numpy.yml
+++ b/.github/workflows/numpy.yml
@@ -22,10 +22,10 @@ jobs:
# runs-on: ubuntu-20.04
# steps:
# - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
- linux-arm64:
- runs-on: ubuntu-20.04
- steps:
- - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
+# linux-arm64:
+# runs-on: ubuntu-20.04
+# steps:
+# - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
# linux-ppc64le:
# runs-on: ubuntu-20.04
# steps:
@@ -51,7 +51,7 @@ jobs:
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-windows@actions
redeploy:
- needs: [linux-arm64, linux-x86_64, macosx-x86_64, windows-x86_64]
+ needs: [linux-x86_64, macosx-x86_64, windows-x86_64]
# needs: [linux-armhf, linux-arm64, linux-ppc64le, linux-x86, linux-x86_64, macosx-x86_64, windows-x86, windows-x86_64]
runs-on: ubuntu-20.04
steps:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 28b208a0057..3526f100284 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,7 @@
* Build FFmpeg with zimg to enable zscale filter ([pull #1481](https://github.com/bytedeco/javacpp-presets/pull/1481))
* Enable PulseAudio support for FFmpeg on Linux ([pull #1472](https://github.com/bytedeco/javacpp-presets/pull/1472))
* Virtualize `btCollisionWorld`, `btOverlapFilterCallback`, `btOverlapCallback` from Bullet Physics SDK ([pull #1475](https://github.com/bytedeco/javacpp-presets/pull/1475))
- * Upgrade presets for OpenCV 4.10.0, FFmpeg 7.0, DNNL 3.4.1, OpenBLAS 0.3.27, CMINPACK 1.3.9, GSL 2.8, CPython 3.12.4, NumPy 1.26.4, SciPy 1.13.1, LLVM 18.1.4, libffi 3.4.6, PyTorch 2.3.0 ([pull #1466](https://github.com/bytedeco/javacpp-presets/pull/1466)), SentencePiece 0.2.0, TensorFlow Lite 2.16.1, TensorRT 10.0.1.6, Triton Inference Server 2.44.0, ONNX 1.16.1, ONNX Runtime 1.18.0, TVM 0.16.0, and their dependencies
+ * Upgrade presets for OpenCV 4.10.0, FFmpeg 7.0, DNNL 3.4.1, OpenBLAS 0.3.27, CMINPACK 1.3.9, GSL 2.8, CPython 3.12.4, NumPy 2.0.0, SciPy 1.14.0, LLVM 18.1.4, Tesseract 5.4.1, libffi 3.4.6, PyTorch 2.3.0 ([pull #1466](https://github.com/bytedeco/javacpp-presets/pull/1466)), SentencePiece 0.2.0, TensorFlow Lite 2.16.1, TensorRT 10.0.1.6, Triton Inference Server 2.44.0, ONNX 1.16.1, ONNX Runtime 1.18.0, TVM 0.16.0, and their dependencies
### January 29, 2024 version 1.5.10
* Introduce `macosx-arm64` builds for PyTorch ([pull #1463](https://github.com/bytedeco/javacpp-presets/pull/1463))
diff --git a/README.md b/README.md
index 48f6dd29afd..9a5a5621c98 100644
--- a/README.md
+++ b/README.md
@@ -205,15 +205,15 @@ Each child module in turn relies by default on the included [`cppbuild.sh` scrip
* FFTW 3.3.10 http://www.fftw.org/download.html
* GSL 2.8 http://www.gnu.org/software/gsl/#downloading
* CPython 3.12.x https://www.python.org/downloads/
- * NumPy 1.26.x https://github.com/numpy/numpy
- * SciPy 1.13.x https://github.com/scipy/scipy
+ * NumPy 2.0.x https://github.com/numpy/numpy
+ * SciPy 1.14.x https://github.com/scipy/scipy
* Gym 0.26.x https://github.com/openai/gym
* LLVM 18.1.x http://llvm.org/releases/download.html
* libffi 3.4.x https://github.com/libffi/libffi
* libpostal 1.1 https://github.com/openvenues/libpostal
* LibRaw 0.21.x https://www.libraw.org/download
* Leptonica 1.84.x http://www.leptonica.org/download.html
- * Tesseract 5.3.x https://github.com/tesseract-ocr/tesseract
+ * Tesseract 5.4.x https://github.com/tesseract-ocr/tesseract
* Caffe 1.0 https://github.com/BVLC/caffe
* OpenPose 1.7.0 https://github.com/CMU-Perceptual-Computing-Lab/openpose
* CUDA 12.3.x https://developer.nvidia.com/cuda-downloads
diff --git a/numpy/README.md b/numpy/README.md
index e8ea6a752fd..6b990c7753a 100644
--- a/numpy/README.md
+++ b/numpy/README.md
@@ -9,7 +9,7 @@ Introduction
------------
This directory contains the JavaCPP Presets module for:
- * NumPy 1.26.4 http://www.numpy.org/
+ * NumPy 2.0.0 http://www.numpy.org/
Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.
@@ -48,7 +48,7 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
org.bytedeco
numpy-platform
- 1.26.4-1.5.11-SNAPSHOT
+ 2.0.0-1.5.11-SNAPSHOT
diff --git a/numpy/cppbuild.sh b/numpy/cppbuild.sh
index 67cbc742194..1b3080f843b 100755
--- a/numpy/cppbuild.sh
+++ b/numpy/cppbuild.sh
@@ -7,7 +7,7 @@ if [[ -z "$PLATFORM" ]]; then
exit
fi
-NUMPY_VERSION=1.26.4
+NUMPY_VERSION=2.0.0
download https://github.com/numpy/numpy/releases/download/v$NUMPY_VERSION/numpy-$NUMPY_VERSION.tar.gz numpy-$NUMPY_VERSION.tar.gz
mkdir -p $PLATFORM
@@ -57,18 +57,6 @@ sedinplace "/lapack_dep = dependency(.*)/c\\
lapack_dep = blas\\
" numpy/meson.build
-sedinplace '/_distributor_init_local/d' numpy/meson.build
-
-# https://github.com/scipy/scipy/issues/13072
-sedinplace 's/for lib in libraries:/for lib in libraries[:]:/g' ./numpy/distutils/command/build_ext.py
-
-# https://github.com/numpy/numpy/pull/20354
-sedinplace 's/auto x/double x/g' numpy/core/setup.py
-
-sedinplace '/import numpy.distutils.command.sdist/i\
-import setuptools\
-' setup.py
-
echo "[openblas]" > site.cfg
echo "libraries = openblas" >> site.cfg
echo "library_dirs = $OPENBLAS_PATH/lib/" >> site.cfg
diff --git a/numpy/platform/pom.xml b/numpy/platform/pom.xml
index a12ae5e0b20..be9433fb78e 100644
--- a/numpy/platform/pom.xml
+++ b/numpy/platform/pom.xml
@@ -12,7 +12,7 @@
org.bytedeco
numpy-platform
- 1.26.4-${project.parent.version}
+ 2.0.0-${project.parent.version}
JavaCPP Presets Platform for NumPy
@@ -41,12 +41,12 @@
-
- ${project.groupId}
- ${javacpp.moduleId}
- ${project.version}
- ${javacpp.platform.linux-arm64}
-
+
+
+
+
+
+
@@ -141,7 +141,7 @@
module org.bytedeco.${javacpp.moduleId}.platform {
// requires static org.bytedeco.${javacpp.moduleId}.linux.armhf;
- requires static org.bytedeco.${javacpp.moduleId}.linux.arm64;
+// requires static org.bytedeco.${javacpp.moduleId}.linux.arm64;
// requires static org.bytedeco.${javacpp.moduleId}.linux.ppc64le;
// requires static org.bytedeco.${javacpp.moduleId}.linux.x86;
requires static org.bytedeco.${javacpp.moduleId}.linux.x86_64;
diff --git a/numpy/pom.xml b/numpy/pom.xml
index e86039c4953..a83dc3a79f8 100644
--- a/numpy/pom.xml
+++ b/numpy/pom.xml
@@ -11,7 +11,7 @@
org.bytedeco
numpy
- 1.26.4-${project.parent.version}
+ 2.0.0-${project.parent.version}
JavaCPP Presets for NumPy
@@ -81,14 +81,14 @@
${basedir}/../cpython/target/classes/org/bytedeco/cpython/include/
${basedir}/../cpython/cppbuild/${javacpp.platform}/include/
${basedir}/../cpython/cppbuild/${javacpp.platform}/include/python3.12/
- ${basedir}/cppbuild/${javacpp.platform}/python/numpy/core/include/
- ${basedir}/cppbuild/${javacpp.platform}/python/numpy/core/include/numpy/
+ ${basedir}/cppbuild/${javacpp.platform}/python/numpy/_core/include/
+ ${basedir}/cppbuild/${javacpp.platform}/python/numpy/_core/include/numpy/
${basedir}/../openblas/cppbuild/${javacpp.platform}/lib/
${basedir}/../cpython/cppbuild/${javacpp.platform}/lib/
${basedir}/../cpython/cppbuild/${javacpp.platform}/libs/
- ${basedir}/cppbuild/${javacpp.platform}/python/numpy/core/lib/
+ ${basedir}/cppbuild/${javacpp.platform}/python/numpy/_core/lib/
${basedir}/../openblas/cppbuild/${javacpp.platform}/bin/
diff --git a/numpy/samples/pom.xml b/numpy/samples/pom.xml
index ad26beafbc0..cfeb40f12d0 100644
--- a/numpy/samples/pom.xml
+++ b/numpy/samples/pom.xml
@@ -12,7 +12,7 @@
org.bytedeco
numpy-platform
- 1.26.4-1.5.11-SNAPSHOT
+ 2.0.0-1.5.11-SNAPSHOT
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_FastPutmaskFunc.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_CommonDType.java
similarity index 67%
rename from numpy/src/gen/java/org/bytedeco/numpy/PyArray_FastPutmaskFunc.java
rename to numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_CommonDType.java
index 40a945007ad..684ae218296 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_FastPutmaskFunc.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_CommonDType.java
@@ -15,12 +15,12 @@
import static org.bytedeco.numpy.global.numpy.*;
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
-public class PyArray_FastPutmaskFunc extends FunctionPointer {
+public class PyArrayDTypeMeta_CommonDType extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
- public PyArray_FastPutmaskFunc(Pointer p) { super(p); }
- protected PyArray_FastPutmaskFunc() { allocate(); }
+ public PyArrayDTypeMeta_CommonDType(Pointer p) { super(p); }
+ protected PyArrayDTypeMeta_CommonDType() { allocate(); }
private native void allocate();
- public native void call(Pointer in, Pointer mask, @Cast("npy_intp") long n_in,
- Pointer values, @Cast("npy_intp") long nv);
+ public native PyArray_DTypeMeta call(
+ PyArray_DTypeMeta dtype1, PyArray_DTypeMeta dtype2);
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_FastClipFunc.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_CommonInstance.java
similarity index 69%
rename from numpy/src/gen/java/org/bytedeco/numpy/PyArray_FastClipFunc.java
rename to numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_CommonInstance.java
index b90a4d32f08..e75d0e00e3d 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_FastClipFunc.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_CommonInstance.java
@@ -15,13 +15,14 @@
import static org.bytedeco.numpy.global.numpy.*;
+
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
-public class PyArray_FastClipFunc extends FunctionPointer {
+public class PyArrayDTypeMeta_CommonInstance extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
- public PyArray_FastClipFunc(Pointer p) { super(p); }
- protected PyArray_FastClipFunc() { allocate(); }
+ public PyArrayDTypeMeta_CommonInstance(Pointer p) { super(p); }
+ protected PyArrayDTypeMeta_CommonInstance() { allocate(); }
private native void allocate();
- public native void call(Pointer in, @Cast("npy_intp") long n_in, Pointer min,
- Pointer max, Pointer out);
+ public native PyArray_Descr call(
+ PyArray_Descr dtype1, PyArray_Descr dtype2);
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_PartitionFunc.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_DefaultDescriptor.java
similarity index 61%
rename from numpy/src/gen/java/org/bytedeco/numpy/PyArray_PartitionFunc.java
rename to numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_DefaultDescriptor.java
index 8d816e45510..ed81577f45d 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_PartitionFunc.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_DefaultDescriptor.java
@@ -14,14 +14,13 @@
import static org.bytedeco.numpy.global.numpy.*;
+
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
-public class PyArray_PartitionFunc extends FunctionPointer {
+public class PyArrayDTypeMeta_DefaultDescriptor extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
- public PyArray_PartitionFunc(Pointer p) { super(p); }
- protected PyArray_PartitionFunc() { allocate(); }
+ public PyArrayDTypeMeta_DefaultDescriptor(Pointer p) { super(p); }
+ protected PyArrayDTypeMeta_DefaultDescriptor() { allocate(); }
private native void allocate();
- public native int call(Pointer arg0, @Cast("npy_intp") long arg1, @Cast("npy_intp") long arg2,
- @Cast("npy_intp*") SizeTPointer arg3, @Cast("npy_intp*") SizeTPointer arg4,
- Pointer arg5);
+ public native PyArray_Descr call(PyArray_DTypeMeta cls);
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyDataMem_EventHookFunc.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_DiscoverDescrFromPyobject.java
similarity index 60%
rename from numpy/src/gen/java/org/bytedeco/numpy/PyDataMem_EventHookFunc.java
rename to numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_DiscoverDescrFromPyobject.java
index f27d0e87e04..1a0e155a1a5 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyDataMem_EventHookFunc.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_DiscoverDescrFromPyobject.java
@@ -15,17 +15,14 @@
import static org.bytedeco.numpy.global.numpy.*;
-/*
- * This is a function for hooking into the PyDataMem_NEW/FREE/RENEW functions.
- * See the documentation for PyDataMem_SetEventHook.
- */
+
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
-public class PyDataMem_EventHookFunc extends FunctionPointer {
+public class PyArrayDTypeMeta_DiscoverDescrFromPyobject extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
- public PyDataMem_EventHookFunc(Pointer p) { super(p); }
- protected PyDataMem_EventHookFunc() { allocate(); }
+ public PyArrayDTypeMeta_DiscoverDescrFromPyobject(Pointer p) { super(p); }
+ protected PyArrayDTypeMeta_DiscoverDescrFromPyobject() { allocate(); }
private native void allocate();
- public native void call(Pointer inp, Pointer outp, @Cast("size_t") long size,
- Pointer user_data);
+ public native PyArray_Descr call(
+ PyArray_DTypeMeta cls, PyObject obj);
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_EnsureCanonical.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_EnsureCanonical.java
new file mode 100644
index 00000000000..6f8a808d93e
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_EnsureCanonical.java
@@ -0,0 +1,25 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayDTypeMeta_EnsureCanonical extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayDTypeMeta_EnsureCanonical(Pointer p) { super(p); }
+ protected PyArrayDTypeMeta_EnsureCanonical() { allocate(); }
+ private native void allocate();
+ public native PyArray_Descr call(PyArray_Descr dtype);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_FinalizeDescriptor.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_FinalizeDescriptor.java
new file mode 100644
index 00000000000..059ab4693be
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_FinalizeDescriptor.java
@@ -0,0 +1,32 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+/*
+ * Returns either a new reference to *dtype* or a new descriptor instance
+ * initialized with the same parameters as *dtype*. The caller cannot know
+ * which choice a dtype will make. This function is called just before the
+ * array buffer is created for a newly created array, it is not called for
+ * views and the descriptor returned by this function is attached to the array.
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayDTypeMeta_FinalizeDescriptor extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayDTypeMeta_FinalizeDescriptor(Pointer p) { super(p); }
+ protected PyArrayDTypeMeta_FinalizeDescriptor() { allocate(); }
+ private native void allocate();
+ public native PyArray_Descr call(PyArray_Descr dtype);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_GetItem.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_GetItem.java
new file mode 100644
index 00000000000..138711fefa0
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_GetItem.java
@@ -0,0 +1,25 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayDTypeMeta_GetItem extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayDTypeMeta_GetItem(Pointer p) { super(p); }
+ protected PyArrayDTypeMeta_GetItem() { allocate(); }
+ private native void allocate();
+ public native PyObject call(PyArray_Descr arg0, @Cast("char*") BytePointer arg1);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_IsKnownScalarType.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_IsKnownScalarType.java
new file mode 100644
index 00000000000..4e369738d5b
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_IsKnownScalarType.java
@@ -0,0 +1,33 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+/*
+ * Before making this public, we should decide whether it should pass
+ * the type, or allow looking at the object. A possible use-case:
+ * `np.array(np.array([0]), dtype=np.ndarray)`
+ * Could consider arrays that are not `dtype=ndarray` "scalars".
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayDTypeMeta_IsKnownScalarType extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayDTypeMeta_IsKnownScalarType(Pointer p) { super(p); }
+ protected PyArrayDTypeMeta_IsKnownScalarType() { allocate(); }
+ private native void allocate();
+ public native int call(
+ PyArray_DTypeMeta cls, PyTypeObject obj);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_SetItem.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_SetItem.java
new file mode 100644
index 00000000000..b4651b21576
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_SetItem.java
@@ -0,0 +1,33 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+/*
+ * TODO: These two functions are currently only used for experimental DType
+ * API support. Their relation should be "reversed": NumPy should
+ * always use them internally.
+ * There are open points about "casting safety" though, e.g. setting
+ * elements is currently always unsafe.
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayDTypeMeta_SetItem extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayDTypeMeta_SetItem(Pointer p) { super(p); }
+ protected PyArrayDTypeMeta_SetItem() { allocate(); }
+ private native void allocate();
+ public native int call(PyArray_Descr arg0, PyObject arg1, @Cast("char*") BytePointer arg2);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_Spec.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_Spec.java
new file mode 100644
index 00000000000..6f6bb269a46
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayDTypeMeta_Spec.java
@@ -0,0 +1,46 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+// TODO: These slots probably still need some thought, and/or a way to "grow"?
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayDTypeMeta_Spec extends Pointer {
+ static { Loader.load(); }
+ /** Default native constructor. */
+ public PyArrayDTypeMeta_Spec() { super((Pointer)null); allocate(); }
+ /** Native array allocator. Access with {@link Pointer#position(long)}. */
+ public PyArrayDTypeMeta_Spec(long size) { super((Pointer)null); allocateArray(size); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayDTypeMeta_Spec(Pointer p) { super(p); }
+ private native void allocate();
+ private native void allocateArray(long size);
+ @Override public PyArrayDTypeMeta_Spec position(long position) {
+ return (PyArrayDTypeMeta_Spec)super.position(position);
+ }
+ @Override public PyArrayDTypeMeta_Spec getPointer(long i) {
+ return new PyArrayDTypeMeta_Spec((Pointer)this).offsetAddress(i);
+ }
+
+ public native PyTypeObject typeobj(); public native PyArrayDTypeMeta_Spec typeobj(PyTypeObject setter); /* type of python scalar or NULL */
+ public native int flags(); public native PyArrayDTypeMeta_Spec flags(int setter); /* flags, including parametric and abstract */
+ /* NULL terminated cast definitions. Use NULL for the newly created DType */
+ public native PyArrayMethod_Spec casts(int i); public native PyArrayDTypeMeta_Spec casts(int i, PyArrayMethod_Spec setter);
+ public native @Cast("PyArrayMethod_Spec**") PointerPointer casts(); public native PyArrayDTypeMeta_Spec casts(PointerPointer setter);
+ public native PyType_Slot slots(); public native PyArrayDTypeMeta_Spec slots(PyType_Slot setter);
+ /* Baseclass or NULL (will always subclass `np.dtype`) */
+ public native PyTypeObject baseclass(); public native PyArrayDTypeMeta_Spec baseclass(PyTypeObject setter);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayFlagsObject.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayFlagsObject.java
deleted file mode 100644
index 8d6d67c5bee..00000000000
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayFlagsObject.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
-
-package org.bytedeco.numpy;
-
-import java.nio.*;
-import org.bytedeco.javacpp.*;
-import org.bytedeco.javacpp.annotation.*;
-
-import static org.bytedeco.javacpp.presets.javacpp.*;
-import static org.bytedeco.openblas.global.openblas_nolapack.*;
-import static org.bytedeco.openblas.global.openblas.*;
-import org.bytedeco.cpython.*;
-import static org.bytedeco.cpython.global.python.*;
-
-import static org.bytedeco.numpy.global.numpy.*;
-
-// #endif
-
-/*
- * Removed 2020-Nov-25, NumPy 1.20
- * #define NPY_SIZEOF_PYARRAYOBJECT (sizeof(PyArrayObject_fields))
- *
- * The above macro was removed as it gave a false sense of a stable ABI
- * with respect to the structures size. If you require a runtime constant,
- * you can use `PyArray_Type.tp_basicsize` instead. Otherwise, please
- * see the PyArrayObject documentation or ask the NumPy developers for
- * information on how to correctly replace the macro in a way that is
- * compatible with multiple NumPy versions.
- */
-
-
-/* Array Flags Object */
-@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
-public class PyArrayFlagsObject extends Pointer {
- static { Loader.load(); }
- /** Default native constructor. */
- public PyArrayFlagsObject() { super((Pointer)null); allocate(); }
- /** Native array allocator. Access with {@link Pointer#position(long)}. */
- public PyArrayFlagsObject(long size) { super((Pointer)null); allocateArray(size); }
- /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
- public PyArrayFlagsObject(Pointer p) { super(p); }
- private native void allocate();
- private native void allocateArray(long size);
- @Override public PyArrayFlagsObject position(long position) {
- return (PyArrayFlagsObject)super.position(position);
- }
- @Override public PyArrayFlagsObject getPointer(long i) {
- return new PyArrayFlagsObject((Pointer)this).offsetAddress(i);
- }
-
- public native @ByRef PyObject ob_base(); public native PyArrayFlagsObject ob_base(PyObject setter);
- public native PyObject arr(); public native PyArrayFlagsObject arr(PyObject setter);
- public native int flags(); public native PyArrayFlagsObject flags(int setter);
-}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMapIterObject.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMapIterObject.java
deleted file mode 100644
index 903be57f0cd..00000000000
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMapIterObject.java
+++ /dev/null
@@ -1,130 +0,0 @@
-// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
-
-package org.bytedeco.numpy;
-
-import java.nio.*;
-import org.bytedeco.javacpp.*;
-import org.bytedeco.javacpp.annotation.*;
-
-import static org.bytedeco.javacpp.presets.javacpp.*;
-import static org.bytedeco.openblas.global.openblas_nolapack.*;
-import static org.bytedeco.openblas.global.openblas.*;
-import org.bytedeco.cpython.*;
-import static org.bytedeco.cpython.global.python.*;
-
-import static org.bytedeco.numpy.global.numpy.*;
-
-
-/*
- * Store the information needed for fancy-indexing over an array. The
- * fields are slightly unordered to keep consec, dataptr and subspace
- * where they were originally.
- */
-@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
-public class PyArrayMapIterObject extends Pointer {
- static { Loader.load(); }
- /** Default native constructor. */
- public PyArrayMapIterObject() { super((Pointer)null); allocate(); }
- /** Native array allocator. Access with {@link Pointer#position(long)}. */
- public PyArrayMapIterObject(long size) { super((Pointer)null); allocateArray(size); }
- /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
- public PyArrayMapIterObject(Pointer p) { super(p); }
- private native void allocate();
- private native void allocateArray(long size);
- @Override public PyArrayMapIterObject position(long position) {
- return (PyArrayMapIterObject)super.position(position);
- }
- @Override public PyArrayMapIterObject getPointer(long i) {
- return new PyArrayMapIterObject((Pointer)this).offsetAddress(i);
- }
-
- public native @ByRef PyObject ob_base(); public native PyArrayMapIterObject ob_base(PyObject setter);
- /*
- * Multi-iterator portion --- needs to be present in this
- * order to work with PyArray_Broadcast
- */
-
- public native int numiter(); public native PyArrayMapIterObject numiter(int setter); /* number of index-array
- iterators */
- public native @Cast("npy_intp") long size(); public native PyArrayMapIterObject size(long setter); /* size of broadcasted
- result */
- public native @Cast("npy_intp") long index(); public native PyArrayMapIterObject index(long setter); /* current index */
- public native int nd(); public native PyArrayMapIterObject nd(int setter); /* number of dims */
- public native @Cast("npy_intp") long dimensions(int i); public native PyArrayMapIterObject dimensions(int i, long setter);
- @MemberGetter public native @Cast("npy_intp*") SizeTPointer dimensions(); /* dimensions */
- public native NpyIter outer(); public native PyArrayMapIterObject outer(NpyIter setter); /* index objects
- iterator */
- public native Pointer unused(int i); public native PyArrayMapIterObject unused(int i, Pointer setter);
- @MemberGetter public native @Cast("void**") PointerPointer unused();
- public native PyArrayObject array(); public native PyArrayMapIterObject array(PyArrayObject setter);
- /* Flat iterator for the indexed array. For compatibility solely. */
- public native PyArrayIterObject ait(); public native PyArrayMapIterObject ait(PyArrayIterObject setter);
-
- /*
- * Subspace array. For binary compatibility (was an iterator,
- * but only the check for NULL should be used).
- */
- public native PyArrayObject subspace(); public native PyArrayMapIterObject subspace(PyArrayObject setter);
-
- /*
- * if subspace iteration, then this is the array of axes in
- * the underlying array represented by the index objects
- */
- public native int iteraxes(int i); public native PyArrayMapIterObject iteraxes(int i, int setter);
- @MemberGetter public native IntPointer iteraxes();
- public native @Cast("npy_intp") long fancy_strides(int i); public native PyArrayMapIterObject fancy_strides(int i, long setter);
- @MemberGetter public native @Cast("npy_intp*") SizeTPointer fancy_strides();
-
- /* pointer when all fancy indices are 0 */
- public native @Cast("char*") BytePointer baseoffset(); public native PyArrayMapIterObject baseoffset(BytePointer setter);
-
- /*
- * after binding consec denotes at which axis the fancy axes
- * are inserted.
- */
- public native int consec(); public native PyArrayMapIterObject consec(int setter);
- public native @Cast("char*") BytePointer dataptr(); public native PyArrayMapIterObject dataptr(BytePointer setter);
-
- public native int nd_fancy(); public native PyArrayMapIterObject nd_fancy(int setter);
- public native @Cast("npy_intp") long fancy_dims(int i); public native PyArrayMapIterObject fancy_dims(int i, long setter);
- @MemberGetter public native @Cast("npy_intp*") SizeTPointer fancy_dims();
-
- /*
- * Whether the iterator (any of the iterators) requires API. This is
- * unused by NumPy itself; ArrayMethod flags are more precise.
- */
- public native int needs_api(); public native PyArrayMapIterObject needs_api(int setter);
-
- /*
- * Extra op information.
- */
- public native PyArrayObject extra_op(); public native PyArrayMapIterObject extra_op(PyArrayObject setter);
- public native PyArray_Descr extra_op_dtype(); public native PyArrayMapIterObject extra_op_dtype(PyArray_Descr setter); /* desired dtype */
- public native @Cast("npy_uint32*") IntPointer extra_op_flags(); public native PyArrayMapIterObject extra_op_flags(IntPointer setter); /* Iterator flags */
-
- public native NpyIter extra_op_iter(); public native PyArrayMapIterObject extra_op_iter(NpyIter setter);
- public native NpyIter_IterNextFunc extra_op_next(); public native PyArrayMapIterObject extra_op_next(NpyIter_IterNextFunc setter);
- public native @Cast("char*") BytePointer extra_op_ptrs(int i); public native PyArrayMapIterObject extra_op_ptrs(int i, BytePointer setter);
- public native @Cast("char**") PointerPointer extra_op_ptrs(); public native PyArrayMapIterObject extra_op_ptrs(PointerPointer setter);
-
- /*
- * Information about the iteration state.
- */
- public native NpyIter_IterNextFunc outer_next(); public native PyArrayMapIterObject outer_next(NpyIter_IterNextFunc setter);
- public native @Cast("char*") BytePointer outer_ptrs(int i); public native PyArrayMapIterObject outer_ptrs(int i, BytePointer setter);
- public native @Cast("char**") PointerPointer outer_ptrs(); public native PyArrayMapIterObject outer_ptrs(PointerPointer setter);
- public native @Cast("npy_intp*") SizeTPointer outer_strides(); public native PyArrayMapIterObject outer_strides(SizeTPointer setter);
-
- /*
- * Information about the subspace iterator.
- */
- public native NpyIter subspace_iter(); public native PyArrayMapIterObject subspace_iter(NpyIter setter);
- public native NpyIter_IterNextFunc subspace_next(); public native PyArrayMapIterObject subspace_next(NpyIter_IterNextFunc setter);
- public native @Cast("char*") BytePointer subspace_ptrs(int i); public native PyArrayMapIterObject subspace_ptrs(int i, BytePointer setter);
- public native @Cast("char**") PointerPointer subspace_ptrs(); public native PyArrayMapIterObject subspace_ptrs(PointerPointer setter);
- public native @Cast("npy_intp*") SizeTPointer subspace_strides(); public native PyArrayMapIterObject subspace_strides(SizeTPointer setter);
-
- /* Count for the external loop (which ever it is) for API iteration */
- public native @Cast("npy_intp") long iter_count(); public native PyArrayMapIterObject iter_count(long setter);
-
-}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethodObject_tag.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethodObject_tag.java
new file mode 100644
index 00000000000..ae4c2e93622
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethodObject_tag.java
@@ -0,0 +1,24 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+@Opaque @Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethodObject_tag extends Pointer {
+ /** Empty constructor. Calls {@code super((Pointer)null)}. */
+ public PyArrayMethodObject_tag() { super((Pointer)null); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethodObject_tag(Pointer p) { super(p); }
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_Context.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_Context.java
new file mode 100644
index 00000000000..5deae5c9187
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_Context.java
@@ -0,0 +1,46 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_Context extends Pointer {
+ static { Loader.load(); }
+ /** Default native constructor. */
+ public PyArrayMethod_Context() { super((Pointer)null); allocate(); }
+ /** Native array allocator. Access with {@link Pointer#position(long)}. */
+ public PyArrayMethod_Context(long size) { super((Pointer)null); allocateArray(size); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_Context(Pointer p) { super(p); }
+ private native void allocate();
+ private native void allocateArray(long size);
+ @Override public PyArrayMethod_Context position(long position) {
+ return (PyArrayMethod_Context)super.position(position);
+ }
+ @Override public PyArrayMethod_Context getPointer(long i) {
+ return new PyArrayMethod_Context((Pointer)this).offsetAddress(i);
+ }
+
+ /* The caller, which is typically the original ufunc. May be NULL */
+ public native PyObject caller(); public native PyArrayMethod_Context caller(PyObject setter);
+ /* The method "self". Currently an opaque object. */
+ public native PyArrayMethodObject_tag method(); public native PyArrayMethod_Context method(PyArrayMethodObject_tag setter);
+
+ /* Operand descriptors, filled in by resolve_descriptors */
+ @MemberGetter public native PyArray_Descr descriptors(int i);
+ @MemberGetter public native @Cast("PyArray_Descr*const*") PointerPointer descriptors();
+ /* Structure may grow (this is harmless for DType authors) */
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArgPartitionFunc.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_GetLoop.java
similarity index 57%
rename from numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArgPartitionFunc.java
rename to numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_GetLoop.java
index 81cdce63372..30016409c9b 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArgPartitionFunc.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_GetLoop.java
@@ -14,14 +14,20 @@
import static org.bytedeco.numpy.global.numpy.*;
+
+
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
-public class PyArray_ArgPartitionFunc extends FunctionPointer {
+public class PyArrayMethod_GetLoop extends FunctionPointer {
static { Loader.load(); }
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
- public PyArray_ArgPartitionFunc(Pointer p) { super(p); }
- protected PyArray_ArgPartitionFunc() { allocate(); }
+ public PyArrayMethod_GetLoop(Pointer p) { super(p); }
+ protected PyArrayMethod_GetLoop() { allocate(); }
private native void allocate();
- public native int call(Pointer arg0, @Cast("npy_intp*") SizeTPointer arg1, @Cast("npy_intp") long arg2, @Cast("npy_intp") long arg3,
- @Cast("npy_intp*") SizeTPointer arg4, @Cast("npy_intp*") SizeTPointer arg5,
- Pointer arg6);
+ public native int call(
+ PyArrayMethod_Context context,
+ int aligned, int move_references,
+ @Cast("const npy_intp*") SizeTPointer strides,
+ @Cast("PyArrayMethod_StridedLoop**") PointerPointer out_loop,
+ @Cast("NpyAuxData**") PointerPointer out_transferdata,
+ @Cast("NPY_ARRAYMETHOD_FLAGS*") IntPointer flags);
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_GetReductionInitial.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_GetReductionInitial.java
new file mode 100644
index 00000000000..fb559408fe4
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_GetReductionInitial.java
@@ -0,0 +1,48 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+/**
+ * Query an ArrayMethod for the initial value for use in reduction.
+ *
+ * @param context The arraymethod context, mainly to access the descriptors.
+ * @param reduction_is_empty Whether the reduction is empty. When it is, the
+ * value returned may differ. In this case it is a "default" value that
+ * may differ from the "identity" value normally used. For example:
+ * - {@code 0.0} is the default for {@code sum([])}. But {@code -0.0} is the correct
+ * identity otherwise as it preserves the sign for {@code sum([-0.0])}.
+ * - We use no identity for object, but return the default of {@code 0} and {@code 1}
+ * for the empty {@code sum([], dtype=object)} and {@code prod([], dtype=object)}.
+ * This allows {@code np.sum(np.array(["a", "b"], dtype=object))} to work.
+ * - {@code -inf} or {@code INT_MIN} for {@code max} is an identity, but at least {@code INT_MIN}
+ * not a good *default* when there are no items.
+ * @param initial Pointer to initial data to be filled (if possible)
+ *
+ * @return -1, 0, or 1 indicating error, no initial value, and initial being
+ * successfully filled. Errors must not be given where 0 is correct, NumPy
+ * may call this even when not strictly necessary.
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_GetReductionInitial extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_GetReductionInitial(Pointer p) { super(p); }
+ protected PyArrayMethod_GetReductionInitial() { allocate(); }
+ private native void allocate();
+ public native int call(
+ PyArrayMethod_Context context, @Cast("npy_bool") byte reduction_is_empty,
+ Pointer initial);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_GetTraverseLoop.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_GetTraverseLoop.java
new file mode 100644
index 00000000000..08da4d2aef1
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_GetTraverseLoop.java
@@ -0,0 +1,40 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+/*
+ * Simplified get_loop function specific to dtype traversal
+ *
+ * It should set the flags needed for the traversal loop and set out_loop to the
+ * loop function, which must be a valid PyArrayMethod_TraverseLoop
+ * pointer. Currently this is used for zero-filling and clearing arrays storing
+ * embedded references.
+ *
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_GetTraverseLoop extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_GetTraverseLoop(Pointer p) { super(p); }
+ protected PyArrayMethod_GetTraverseLoop() { allocate(); }
+ private native void allocate();
+ public native int call(
+ Pointer traverse_context, @Const PyArray_Descr descr,
+ int aligned, @Cast("npy_intp") long fixed_stride,
+ @Cast("PyArrayMethod_TraverseLoop**") PointerPointer out_loop, @Cast("NpyAuxData**") PointerPointer out_auxdata,
+ @Cast("NPY_ARRAYMETHOD_FLAGS*") IntPointer flags);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_PromoterFunction.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_PromoterFunction.java
new file mode 100644
index 00000000000..f555a3cdec0
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_PromoterFunction.java
@@ -0,0 +1,39 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+/*
+ * Type of the C promoter function, which must be wrapped into a
+ * PyCapsule with name "numpy._ufunc_promoter".
+ *
+ * Note that currently the output dtypes are always NULL unless they are
+ * also part of the signature. This is an implementation detail and could
+ * change in the future. However, in general promoters should not have a
+ * need for output dtypes.
+ * (There are potential use-cases, these are currently unsupported.)
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_PromoterFunction extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_PromoterFunction(Pointer p) { super(p); }
+ protected PyArrayMethod_PromoterFunction() { allocate(); }
+ private native void allocate();
+ public native int call(PyObject ufunc,
+ @Cast("PyArray_DTypeMeta*const*") PointerPointer op_dtypes, @Cast("PyArray_DTypeMeta*const*") PointerPointer signature,
+ @Cast("PyArray_DTypeMeta**") PointerPointer new_op_dtypes);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_ResolveDescriptors.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_ResolveDescriptors.java
new file mode 100644
index 00000000000..97bdaba4285
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_ResolveDescriptors.java
@@ -0,0 +1,42 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+/*
+ * The resolve descriptors function, must be able to handle NULL values for
+ * all output (but not input) `given_descrs` and fill `loop_descrs`.
+ * Return -1 on error or 0 if the operation is not possible without an error
+ * set. (This may still be in flux.)
+ * Otherwise must return the "casting safety", for normal functions, this is
+ * almost always "safe" (or even "equivalent"?).
+ *
+ * `resolve_descriptors` is optional if all output DTypes are non-parametric.
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_ResolveDescriptors extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_ResolveDescriptors(Pointer p) { super(p); }
+ protected PyArrayMethod_ResolveDescriptors() { allocate(); }
+ private native void allocate();
+ public native @Cast("NPY_CASTING") int call(
+ PyArrayMethodObject_tag method,
+ @Cast("PyArray_DTypeMeta*const*") PointerPointer dtypes,
+ @Cast("PyArray_Descr*const*") PointerPointer given_descrs,
+ @Cast("PyArray_Descr**") PointerPointer loop_descrs,
+ @Cast("npy_intp*") SizeTPointer view_offset);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_ResolveDescriptorsWithScalar.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_ResolveDescriptorsWithScalar.java
new file mode 100644
index 00000000000..3f939c76311
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_ResolveDescriptorsWithScalar.java
@@ -0,0 +1,41 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+/*
+ * Rarely needed, slightly more powerful version of `resolve_descriptors`.
+ * See also `PyArrayMethod_ResolveDescriptors` for details on shared arguments.
+ *
+ * NOTE: This function is private now as it is unclear how and what to pass
+ * exactly as additional information to allow dealing with the scalars.
+ * See also gh-24915.
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_ResolveDescriptorsWithScalar extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_ResolveDescriptorsWithScalar(Pointer p) { super(p); }
+ protected PyArrayMethod_ResolveDescriptorsWithScalar() { allocate(); }
+ private native void allocate();
+ public native @Cast("NPY_CASTING") int call(
+ PyArrayMethodObject_tag method,
+ @Cast("PyArray_DTypeMeta*const*") PointerPointer dtypes,
+ @Cast("PyArray_Descr*const*") PointerPointer given_descrs,
+ @Cast("PyObject*const*") PointerPointer input_scalars,
+ @Cast("PyArray_Descr**") PointerPointer loop_descrs,
+ @Cast("npy_intp*") SizeTPointer view_offset);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_Spec.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_Spec.java
new file mode 100644
index 00000000000..302a2e89842
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_Spec.java
@@ -0,0 +1,49 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+/*
+ * The main object for creating a new ArrayMethod. We use the typical `slots`
+ * mechanism used by the Python limited API (see below for the slot defs).
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_Spec extends Pointer {
+ static { Loader.load(); }
+ /** Default native constructor. */
+ public PyArrayMethod_Spec() { super((Pointer)null); allocate(); }
+ /** Native array allocator. Access with {@link Pointer#position(long)}. */
+ public PyArrayMethod_Spec(long size) { super((Pointer)null); allocateArray(size); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_Spec(Pointer p) { super(p); }
+ private native void allocate();
+ private native void allocateArray(long size);
+ @Override public PyArrayMethod_Spec position(long position) {
+ return (PyArrayMethod_Spec)super.position(position);
+ }
+ @Override public PyArrayMethod_Spec getPointer(long i) {
+ return new PyArrayMethod_Spec((Pointer)this).offsetAddress(i);
+ }
+
+ public native @Cast("const char*") BytePointer name(); public native PyArrayMethod_Spec name(BytePointer setter);
+ public native int nin(); public native PyArrayMethod_Spec nin(int setter);
+ public native int nout(); public native PyArrayMethod_Spec nout(int setter);
+ public native @Cast("NPY_CASTING") int casting(); public native PyArrayMethod_Spec casting(int setter);
+ public native @Cast("NPY_ARRAYMETHOD_FLAGS") int flags(); public native PyArrayMethod_Spec flags(int setter);
+ public native PyArray_DTypeMeta dtypes(int i); public native PyArrayMethod_Spec dtypes(int i, PyArray_DTypeMeta setter);
+ public native @Cast("PyArray_DTypeMeta**") PointerPointer dtypes(); public native PyArrayMethod_Spec dtypes(PointerPointer setter);
+ public native PyType_Slot slots(); public native PyArrayMethod_Spec slots(PyType_Slot setter);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_StridedLoop.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_StridedLoop.java
new file mode 100644
index 00000000000..b3441224f22
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_StridedLoop.java
@@ -0,0 +1,30 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_StridedLoop extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_StridedLoop(Pointer p) { super(p); }
+ protected PyArrayMethod_StridedLoop() { allocate(); }
+ private native void allocate();
+ public native int call(PyArrayMethod_Context context,
+ @Cast("char*const*") PointerPointer data, @Cast("const npy_intp*") SizeTPointer dimensions, @Cast("const npy_intp*") SizeTPointer strides,
+ NpyAuxData transferdata);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_TranslateGivenDescriptors.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_TranslateGivenDescriptors.java
new file mode 100644
index 00000000000..a998ba7a2fa
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_TranslateGivenDescriptors.java
@@ -0,0 +1,54 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+/*
+ * The following functions are only used by the wrapping array method defined
+ * in umath/wrapping_array_method.c
+ */
+
+
+/*
+ * The function to convert the given descriptors (passed in to
+ * `resolve_descriptors`) and translates them for the wrapped loop.
+ * The new descriptors MUST be viewable with the old ones, `NULL` must be
+ * supported (for outputs) and should normally be forwarded.
+ *
+ * The function must clean up on error.
+ *
+ * NOTE: We currently assume that this translation gives "viewable" results.
+ * I.e. there is no additional casting related to the wrapping process.
+ * In principle that could be supported, but not sure it is useful.
+ * This currently also means that e.g. alignment must apply identically
+ * to the new dtypes.
+ *
+ * TODO: Due to the fact that `resolve_descriptors` is also used for `can_cast`
+ * there is no way to "pass out" the result of this function. This means
+ * it will be called twice for every ufunc call.
+ * (I am considering including `auxdata` as an "optional" parameter to
+ * `resolve_descriptors`, so that it can be filled there if not NULL.)
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_TranslateGivenDescriptors extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_TranslateGivenDescriptors(Pointer p) { super(p); }
+ protected PyArrayMethod_TranslateGivenDescriptors() { allocate(); }
+ private native void allocate();
+ public native int call(int nin, int nout,
+ @Cast("PyArray_DTypeMeta*const*") PointerPointer wrapped_dtypes,
+ @Cast("PyArray_Descr*const*") PointerPointer given_descrs, @Cast("PyArray_Descr**") PointerPointer new_descrs);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_TranslateLoopDescriptors.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_TranslateLoopDescriptors.java
new file mode 100644
index 00000000000..3e2e1c38187
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_TranslateLoopDescriptors.java
@@ -0,0 +1,46 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+/**
+ * The function to convert the actual loop descriptors (as returned by the
+ * original {@code resolve_descriptors} function) to the ones the output array
+ * should use.
+ * This function must return "viewable" types, it must not mutate them in any
+ * form that would break the inner-loop logic. Does not need to support NULL.
+ *
+ * The function must clean up on error.
+ *
+ * @param nargs Number of arguments
+ * @param new_dtypes The DTypes of the output (usually probably not needed)
+ * @param given_descrs Original given_descrs to the resolver, necessary to
+ * fetch any information related to the new dtypes from the original.
+ * @param original_descrs The {@code loop_descrs} returned by the wrapped loop.
+ * @param loop_descrs The output descriptors, compatible to {@code original_descrs}.
+ *
+ * @return 0 on success, -1 on failure.
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_TranslateLoopDescriptors extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_TranslateLoopDescriptors(Pointer p) { super(p); }
+ protected PyArrayMethod_TranslateLoopDescriptors() { allocate(); }
+ private native void allocate();
+ public native int call(int nin, int nout,
+ @Cast("PyArray_DTypeMeta*const*") PointerPointer new_dtypes, @Cast("PyArray_Descr*const*") PointerPointer given_descrs,
+ @Cast("PyArray_Descr**") PointerPointer original_descrs, @Cast("PyArray_Descr**") PointerPointer loop_descrs);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_TraverseLoop.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_TraverseLoop.java
new file mode 100644
index 00000000000..73f81c4eda1
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMethod_TraverseLoop.java
@@ -0,0 +1,49 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+
+/*
+ * A traverse loop working on a single array. This is similar to the general
+ * strided-loop function. This is designed for loops that need to visit every
+ * element of a single array.
+ *
+ * Currently this is used for array clearing, via the NPY_DT_get_clear_loop
+ * API hook, and zero-filling, via the NPY_DT_get_fill_zero_loop API hook.
+ * These are most useful for handling arrays storing embedded references to
+ * python objects or heap-allocated data.
+ *
+ * The `void *traverse_context` is passed in because we may need to pass in
+ * Interpreter state or similar in the future, but we don't want to pass in
+ * a full context (with pointers to dtypes, method, caller which all make
+ * no sense for a traverse function).
+ *
+ * We assume for now that this context can be just passed through in the
+ * the future (for structured dtypes).
+ *
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArrayMethod_TraverseLoop extends FunctionPointer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArrayMethod_TraverseLoop(Pointer p) { super(p); }
+ protected PyArrayMethod_TraverseLoop() { allocate(); }
+ private native void allocate();
+ public native int call(
+ Pointer traverse_context, @Const PyArray_Descr descr, @Cast("char*") BytePointer data,
+ @Cast("npy_intp") long size, @Cast("npy_intp") long stride, NpyAuxData auxdata);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMultiIterObject.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMultiIterObject.java
index 58bc7e13973..d3b0355b100 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMultiIterObject.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayMultiIterObject.java
@@ -46,6 +46,22 @@ public class PyArrayMultiIterObject extends Pointer {
public native int nd(); public native PyArrayMultiIterObject nd(int setter); /* number of dims */
public native @Cast("npy_intp") long dimensions(int i); public native PyArrayMultiIterObject dimensions(int i, long setter);
@MemberGetter public native @Cast("npy_intp*") SizeTPointer dimensions(); /* dimensions */
+ /*
+ * Space for the individual iterators, do not specify size publicly
+ * to allow changing it more easily.
+ * One reason is that Cython uses this for checks and only allows
+ * growing structs (as of Cython 3.0.6). It also allows NPY_MAXARGS
+ * to be runtime dependent.
+ */
+// #if (defined(NPY_INTERNAL_BUILD) && NPY_INTERNAL_BUILD)
public native PyArrayIterObject iters(int i); public native PyArrayMultiIterObject iters(int i, PyArrayIterObject setter);
- @MemberGetter public native @Cast("PyArrayIterObject**") PointerPointer iters(); /* iterators */
+ @MemberGetter public native @Cast("PyArrayIterObject**") PointerPointer iters();
+// #elif defined(__cplusplus)
+ /*
+ * C++ doesn't stricly support flexible members and gives compilers
+ * warnings (pedantic only), so we lie. We can't make it 64 because
+ * then Cython is unhappy (larger struct at runtime is OK smaller not).
+ */
+// #else
+// #endif
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayObject.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayObject.java
index 824d9b07699..5acd32af98c 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArrayObject.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArrayObject.java
@@ -83,10 +83,12 @@ public class PyArrayObject extends PyObject {
/* For weak references */
public native PyObject weakreflist(); public native PyArrayObject weakreflist(PyObject setter);
// #if NPY_FEATURE_VERSION >= NPY_1_20_API_VERSION
+ public native Pointer _buffer_info(); public native PyArrayObject _buffer_info(Pointer setter); /* private buffer info, tagged to allow warning */
// #endif
/*
* For malloc/calloc/realloc/free per object
*/
// #if NPY_FEATURE_VERSION >= NPY_1_22_API_VERSION
+ public native PyObject mem_handler(); public native PyArrayObject mem_handler(PyObject setter);
// #endif
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArrFuncs.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArrFuncs.java
index c1829d8eae1..541064e6409 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArrFuncs.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArrFuncs.java
@@ -136,9 +136,9 @@ public class PyArray_ArrFuncs extends Pointer {
public native @Cast("int**") PointerPointer cancastscalarkindto(); public native PyArray_ArrFuncs cancastscalarkindto(PointerPointer setter);
public native IntPointer cancastto(); public native PyArray_ArrFuncs cancastto(IntPointer setter);
- public native PyArray_FastClipFunc fastclip(); public native PyArray_ArrFuncs fastclip(PyArray_FastClipFunc setter);
- public native PyArray_FastPutmaskFunc fastputmask(); public native PyArray_ArrFuncs fastputmask(PyArray_FastPutmaskFunc setter);
- public native PyArray_FastTakeFunc fasttake(); public native PyArray_ArrFuncs fasttake(PyArray_FastTakeFunc setter);
+ public native Pointer _unused1(); public native PyArray_ArrFuncs _unused1(Pointer setter);
+ public native Pointer _unused2(); public native PyArray_ArrFuncs _unused2(Pointer setter);
+ public native Pointer _unused3(); public native PyArray_ArrFuncs _unused3(Pointer setter);
/*
* Function to select smallest
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArrayDescr.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArrayDescr.java
index 534bbb8e511..17b2494ad02 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArrayDescr.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_ArrayDescr.java
@@ -15,6 +15,7 @@
import static org.bytedeco.numpy.global.numpy.*;
+
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyArray_ArrayDescr extends Pointer {
static { Loader.load(); }
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_Chunk.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_Chunk.java
index 529cc999352..bad0e480f20 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_Chunk.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_Chunk.java
@@ -14,6 +14,19 @@
import static org.bytedeco.numpy.global.numpy.*;
+// #endif
+
+/*
+ * Removed 2020-Nov-25, NumPy 1.20
+ * #define NPY_SIZEOF_PYARRAYOBJECT (sizeof(PyArrayObject_fields))
+ *
+ * The above macro was removed as it gave a false sense of a stable ABI
+ * with respect to the structures size. If you require a runtime constant,
+ * you can use `PyArray_Type.tp_basicsize` instead. Otherwise, please
+ * see the PyArrayObject documentation or ask the NumPy developers for
+ * information on how to correctly replace the macro in a way that is
+ * compatible with multiple NumPy versions.
+ */
/* Mirrors buffer object to ptr */
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_DTypeMeta.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_DTypeMeta.java
new file mode 100644
index 00000000000..dcbfcbdef4b
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_DTypeMeta.java
@@ -0,0 +1,75 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+/*
+ * Largely opaque struct for DType classes (i.e. metaclass instances).
+ * The internal definition is currently in `ndarraytypes.h` (export is a bit
+ * more complex because `PyArray_Descr` is a DTypeMeta internally but not
+ * externally).
+ */
+// #if !(defined(NPY_INTERNAL_BUILD) && NPY_INTERNAL_BUILD)
+
+// #ifndef Py_LIMITED_API
+
+ @Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArray_DTypeMeta extends Pointer {
+ static { Loader.load(); }
+ /** Default native constructor. */
+ public PyArray_DTypeMeta() { super((Pointer)null); allocate(); }
+ /** Native array allocator. Access with {@link Pointer#position(long)}. */
+ public PyArray_DTypeMeta(long size) { super((Pointer)null); allocateArray(size); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArray_DTypeMeta(Pointer p) { super(p); }
+ private native void allocate();
+ private native void allocateArray(long size);
+ @Override public PyArray_DTypeMeta position(long position) {
+ return (PyArray_DTypeMeta)super.position(position);
+ }
+ @Override public PyArray_DTypeMeta getPointer(long i) {
+ return new PyArray_DTypeMeta((Pointer)this).offsetAddress(i);
+ }
+
+ public native @ByRef @Name("super") PyHeapTypeObject _super(); public native PyArray_DTypeMeta _super(PyHeapTypeObject setter);
+
+ /*
+ * Most DTypes will have a singleton default instance, for the
+ * parametric legacy DTypes (bytes, string, void, datetime) this
+ * may be a pointer to the *prototype* instance?
+ */
+ public native PyArray_Descr singleton(); public native PyArray_DTypeMeta singleton(PyArray_Descr setter);
+ /* Copy of the legacy DTypes type number, usually invalid. */
+ public native int type_num(); public native PyArray_DTypeMeta type_num(int setter);
+
+ /* The type object of the scalar instances (may be NULL?) */
+ public native PyTypeObject scalar_type(); public native PyArray_DTypeMeta scalar_type(PyTypeObject setter);
+ /*
+ * DType flags to signal legacy, parametric, or
+ * abstract. But plenty of space for additional information/flags.
+ */
+ public native @Cast("npy_uint64") long flags(); public native PyArray_DTypeMeta flags(long setter);
+
+ /*
+ * Use indirection in order to allow a fixed size for this struct.
+ * A stable ABI size makes creating a static DType less painful
+ * while also ensuring flexibility for all opaque API (with one
+ * indirection due the pointer lookup).
+ */
+ public native Pointer dt_slots(); public native PyArray_DTypeMeta dt_slots(Pointer setter);
+ /* Allow growing (at the moment also beyond this) */
+ public native Pointer reserved(int i); public native PyArray_DTypeMeta reserved(int i, Pointer setter);
+ @MemberGetter public native @Cast("void**") PointerPointer reserved();
+ }
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_Descr.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_Descr.java
index cc5235ab61a..cfb7f85feda 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_Descr.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_Descr.java
@@ -15,6 +15,10 @@
import static org.bytedeco.numpy.global.numpy.*;
+// #if NPY_FEATURE_VERSION >= NPY_2_0_API_VERSION
+/*
+ * Public version of the Descriptor struct as of 2.x
+ */
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyArray_Descr extends Pointer {
static { Loader.load(); }
@@ -50,46 +54,21 @@ public class PyArray_Descr extends Pointer {
* (not-applicable), or '=' (native).
*/
public native @Cast("char") byte byteorder(); public native PyArray_Descr byteorder(byte setter);
- /* flags describing data type */
- public native @Cast("char") byte flags(); public native PyArray_Descr flags(byte setter);
+ /* Former flags flags space (unused) to ensure type_num is stable. */
+ public native @Cast("char") byte _former_flags(); public native PyArray_Descr _former_flags(byte setter);
/* number representing this type */
public native int type_num(); public native PyArray_Descr type_num(int setter);
+ /* Space for dtype instance specific flags. */
+ public native @Cast("npy_uint64") long flags(); public native PyArray_Descr flags(long setter);
/* element size (itemsize) for this type */
- public native int elsize(); public native PyArray_Descr elsize(int setter);
+ public native @Cast("npy_intp") long elsize(); public native PyArray_Descr elsize(long setter);
/* alignment needed for this type */
- public native int alignment(); public native PyArray_Descr alignment(int setter);
- /*
- * Non-NULL if this type is
- * is an array (C-contiguous)
- * of some other type
- */
- public native PyArray_ArrayDescr subarray(); public native PyArray_Descr subarray(PyArray_ArrayDescr setter);
- /*
- * The fields dictionary for this type
- * For statically defined descr this
- * is always Py_None
- */
- public native PyObject fields(); public native PyArray_Descr fields(PyObject setter);
- /*
- * An ordered tuple of field names or NULL
- * if no fields are defined
- */
- public native PyObject names(); public native PyArray_Descr names(PyObject setter);
- /*
- * a table of functions specific for each
- * basic data descriptor
- */
- public native PyArray_ArrFuncs f(); public native PyArray_Descr f(PyArray_ArrFuncs setter);
- /* Metadata about this dtype */
+ public native @Cast("npy_intp") long alignment(); public native PyArray_Descr alignment(long setter);
+ /* metadata dict or NULL */
public native PyObject metadata(); public native PyArray_Descr metadata(PyObject setter);
- /*
- * Metadata specific to the C implementation
- * of the particular dtype. This was added
- * for NumPy 1.7.0.
- */
- public native NpyAuxData c_metadata(); public native PyArray_Descr c_metadata(NpyAuxData setter);
- /* Cached hash value (-1 if not yet computed).
- * This was added for NumPy 2.0.0.
- */
+ /* Cached hash value (-1 if not yet computed). */
public native @Cast("npy_hash_t") long hash(); public native PyArray_Descr hash(long setter);
+ /* Unused slot (must be initialized to NULL) for future use */
+ public native Pointer reserved_null(int i); public native PyArray_Descr reserved_null(int i, Pointer setter);
+ @MemberGetter public native @Cast("void**") PointerPointer reserved_null();
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_DescrProto.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_DescrProto.java
new file mode 100644
index 00000000000..c7eeeb92161
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_DescrProto.java
@@ -0,0 +1,58 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+/*
+ * Umodified PyArray_Descr struct identical to NumPy 1.x. This struct is
+ * used as a prototype for registering a new legacy DType.
+ * It is also used to access the fields in user code running on 1.x.
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArray_DescrProto extends Pointer {
+ static { Loader.load(); }
+ /** Default native constructor. */
+ public PyArray_DescrProto() { super((Pointer)null); allocate(); }
+ /** Native array allocator. Access with {@link Pointer#position(long)}. */
+ public PyArray_DescrProto(long size) { super((Pointer)null); allocateArray(size); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArray_DescrProto(Pointer p) { super(p); }
+ private native void allocate();
+ private native void allocateArray(long size);
+ @Override public PyArray_DescrProto position(long position) {
+ return (PyArray_DescrProto)super.position(position);
+ }
+ @Override public PyArray_DescrProto getPointer(long i) {
+ return new PyArray_DescrProto((Pointer)this).offsetAddress(i);
+ }
+
+ public native @ByRef PyObject ob_base(); public native PyArray_DescrProto ob_base(PyObject setter);
+ public native PyTypeObject typeobj(); public native PyArray_DescrProto typeobj(PyTypeObject setter);
+ public native @Cast("char") byte kind(); public native PyArray_DescrProto kind(byte setter);
+ public native @Cast("char") byte type(); public native PyArray_DescrProto type(byte setter);
+ public native @Cast("char") byte byteorder(); public native PyArray_DescrProto byteorder(byte setter);
+ public native @Cast("char") byte flags(); public native PyArray_DescrProto flags(byte setter);
+ public native int type_num(); public native PyArray_DescrProto type_num(int setter);
+ public native int elsize(); public native PyArray_DescrProto elsize(int setter);
+ public native int alignment(); public native PyArray_DescrProto alignment(int setter);
+ public native PyArray_ArrayDescr subarray(); public native PyArray_DescrProto subarray(PyArray_ArrayDescr setter);
+ public native PyObject fields(); public native PyArray_DescrProto fields(PyObject setter);
+ public native PyObject names(); public native PyArray_DescrProto names(PyObject setter);
+ public native PyArray_ArrFuncs f(); public native PyArray_DescrProto f(PyArray_ArrFuncs setter);
+ public native PyObject metadata(); public native PyArray_DescrProto metadata(PyObject setter);
+ public native NpyAuxData c_metadata(); public native PyArray_DescrProto c_metadata(NpyAuxData setter);
+ public native @Cast("npy_hash_t") long hash(); public native PyArray_DescrProto hash(long setter);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_FastTakeFunc.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_FastTakeFunc.java
deleted file mode 100644
index 5461e6769cc..00000000000
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_FastTakeFunc.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
-
-package org.bytedeco.numpy;
-
-import java.nio.*;
-import org.bytedeco.javacpp.*;
-import org.bytedeco.javacpp.annotation.*;
-
-import static org.bytedeco.javacpp.presets.javacpp.*;
-import static org.bytedeco.openblas.global.openblas_nolapack.*;
-import static org.bytedeco.openblas.global.openblas.*;
-import org.bytedeco.cpython.*;
-import static org.bytedeco.cpython.global.python.*;
-
-import static org.bytedeco.numpy.global.numpy.*;
-
-@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
-public class PyArray_FastTakeFunc extends FunctionPointer {
- static { Loader.load(); }
- /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
- public PyArray_FastTakeFunc(Pointer p) { super(p); }
- protected PyArray_FastTakeFunc() { allocate(); }
- private native void allocate();
- public native int call(Pointer dest, Pointer src, @Cast("npy_intp*") SizeTPointer indarray,
- @Cast("npy_intp") long nindarray, @Cast("npy_intp") long n_outer,
- @Cast("npy_intp") long m_middle, @Cast("npy_intp") long nelem,
- @Cast("NPY_CLIPMODE") int clipmode);
-}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyArray_StringDTypeObject.java b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_StringDTypeObject.java
new file mode 100644
index 00000000000..3f98bdf4e35
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyArray_StringDTypeObject.java
@@ -0,0 +1,56 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class PyArray_StringDTypeObject extends Pointer {
+ static { Loader.load(); }
+ /** Default native constructor. */
+ public PyArray_StringDTypeObject() { super((Pointer)null); allocate(); }
+ /** Native array allocator. Access with {@link Pointer#position(long)}. */
+ public PyArray_StringDTypeObject(long size) { super((Pointer)null); allocateArray(size); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public PyArray_StringDTypeObject(Pointer p) { super(p); }
+ private native void allocate();
+ private native void allocateArray(long size);
+ @Override public PyArray_StringDTypeObject position(long position) {
+ return (PyArray_StringDTypeObject)super.position(position);
+ }
+ @Override public PyArray_StringDTypeObject getPointer(long i) {
+ return new PyArray_StringDTypeObject((Pointer)this).offsetAddress(i);
+ }
+
+ public native @ByRef PyArray_Descr base(); public native PyArray_StringDTypeObject base(PyArray_Descr setter);
+ // The object representing a null value
+ public native PyObject na_object(); public native PyArray_StringDTypeObject na_object(PyObject setter);
+ // Flag indicating whether or not to coerce arbitrary objects to strings
+ public native @Cast("char") byte coerce(); public native PyArray_StringDTypeObject coerce(byte setter);
+ // Flag indicating the na object is NaN-like
+ public native @Cast("char") byte has_nan_na(); public native PyArray_StringDTypeObject has_nan_na(byte setter);
+ // Flag indicating the na object is a string
+ public native @Cast("char") byte has_string_na(); public native PyArray_StringDTypeObject has_string_na(byte setter);
+ // If nonzero, indicates that this instance is owned by an array already
+ public native @Cast("char") byte array_owned(); public native PyArray_StringDTypeObject array_owned(byte setter);
+ // The string data to use when a default string is needed
+ public native @ByRef npy_static_string default_string(); public native PyArray_StringDTypeObject default_string(npy_static_string setter);
+ // The name of the missing data object, if any
+ public native @ByRef npy_static_string na_name(); public native PyArray_StringDTypeObject na_name(npy_static_string setter);
+ // the allocator should only be directly accessed after
+ // acquiring the allocator_lock and the lock should
+ // be released immediately after the allocator is
+ // no longer needed
+ public native npy_string_allocator allocator(); public native PyArray_StringDTypeObject allocator(npy_string_allocator setter);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyUFuncObject.java b/numpy/src/gen/java/org/bytedeco/numpy/PyUFuncObject.java
index 83b0d7e1066..047b20693d6 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyUFuncObject.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyUFuncObject.java
@@ -54,8 +54,8 @@ public class PyUFuncObject extends Pointer {
/* Array of one-dimensional core loops */
public native @ByPtrPtr PyUFuncGenericFunction functions(); public native PyUFuncObject functions(PyUFuncGenericFunction setter);
/* Array of funcdata that gets passed into the functions */
- public native Pointer data(int i); public native PyUFuncObject data(int i, Pointer setter);
- public native @Cast("void**") PointerPointer data(); public native PyUFuncObject data(PointerPointer setter);
+ @MemberGetter public native Pointer data(int i);
+ @MemberGetter public native @Cast("void*const*") PointerPointer data();
/* The number of elements in 'functions' and 'data' */
public native int ntypes(); public native PyUFuncObject ntypes(int setter);
@@ -66,7 +66,7 @@ public class PyUFuncObject extends Pointer {
public native @Cast("const char*") BytePointer name(); public native PyUFuncObject name(BytePointer setter);
/* Array of type numbers, of size ('nargs' * 'ntypes') */
- public native @Cast("char*") BytePointer types(); public native PyUFuncObject types(BytePointer setter);
+ public native @Cast("const char*") BytePointer types(); public native PyUFuncObject types(BytePointer setter);
/* Documentation string */
public native @Cast("const char*") BytePointer doc(); public native PyUFuncObject doc(BytePointer setter);
@@ -107,13 +107,8 @@ public class PyUFuncObject extends Pointer {
* with the dtypes for the inputs and outputs.
*/
public native PyUFunc_TypeResolutionFunc type_resolver(); public native PyUFuncObject type_resolver(PyUFunc_TypeResolutionFunc setter);
- /*
- * A function which returns an inner loop written for
- * NumPy 1.6 and earlier ufuncs. This is for backwards
- * compatibility, and may be NULL if inner_loop_selector
- * is specified.
- */
- public native PyUFunc_LegacyInnerLoopSelectionFunc legacy_inner_loop_selector(); public native PyUFuncObject legacy_inner_loop_selector(PyUFunc_LegacyInnerLoopSelectionFunc setter);
+ /* Was the legacy loop resolver */
+ public native Pointer reserved2(); public native PyUFuncObject reserved2(Pointer setter);
/*
* This was blocked off to be the "new" inner loop selector in 1.7,
* but this was never implemented. (This is also why the above
@@ -125,7 +120,7 @@ public class PyUFuncObject extends Pointer {
// #endif
/* Was previously the `PyUFunc_MaskedInnerLoopSelectionFunc` */
- public native Pointer _always_null_previously_masked_innerloop_selector(); public native PyUFuncObject _always_null_previously_masked_innerloop_selector(Pointer setter);
+ public native Pointer reserved3(); public native PyUFuncObject reserved3(Pointer setter);
/*
* List of flags for each operand when ufunc is called by nditer object.
@@ -160,5 +155,9 @@ public class PyUFuncObject extends Pointer {
/* New in NPY_API_VERSION 0x0000000F and above */
// #if NPY_FEATURE_VERSION >= NPY_1_22_API_VERSION
+ /* New private fields related to dispatching */
+ public native Pointer _dispatch_cache(); public native PyUFuncObject _dispatch_cache(Pointer setter);
+ /* A PyListObject of `(tuple of DTypes, ArrayMethod/Promoter)` */
+ public native PyObject _loops(); public native PyUFuncObject _loops(PyObject setter);
// #endif
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyUFunc_LegacyInnerLoopSelectionFunc.java b/numpy/src/gen/java/org/bytedeco/numpy/PyUFunc_LegacyInnerLoopSelectionFunc.java
deleted file mode 100644
index 281b38aa59f..00000000000
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyUFunc_LegacyInnerLoopSelectionFunc.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
-
-package org.bytedeco.numpy;
-
-import java.nio.*;
-import org.bytedeco.javacpp.*;
-import org.bytedeco.javacpp.annotation.*;
-
-import static org.bytedeco.javacpp.presets.javacpp.*;
-import static org.bytedeco.openblas.global.openblas_nolapack.*;
-import static org.bytedeco.openblas.global.openblas.*;
-import org.bytedeco.cpython.*;
-import static org.bytedeco.cpython.global.python.*;
-
-import static org.bytedeco.numpy.global.numpy.*;
-
-
-/*
- * Legacy loop selector. (This should NOT normally be used and we can expect
- * that only the `PyUFunc_DefaultLegacyInnerLoopSelector` is ever set).
- * However, unlike the masked version, it probably still works.
- *
- * ufunc: The ufunc object.
- * dtypes: An array which has been populated with dtypes,
- * in most cases by the type resolution function
- * for the same ufunc.
- * out_innerloop: Should be populated with the correct ufunc inner
- * loop for the given type.
- * out_innerloopdata: Should be populated with the void* data to
- * be passed into the out_innerloop function.
- * out_needs_api: If the inner loop needs to use the Python API,
- * should set the to 1, otherwise should leave
- * this untouched.
- */
-@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
-public class PyUFunc_LegacyInnerLoopSelectionFunc extends FunctionPointer {
- static { Loader.load(); }
- /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
- public PyUFunc_LegacyInnerLoopSelectionFunc(Pointer p) { super(p); }
- protected PyUFunc_LegacyInnerLoopSelectionFunc() { allocate(); }
- private native void allocate();
- public native int call(
- PyUFuncObject ufunc,
- @Cast("PyArray_Descr**") PointerPointer dtypes,
- @ByPtrPtr PyUFuncGenericFunction out_innerloop,
- @Cast("void**") PointerPointer out_innerloopdata,
- IntPointer out_needs_api);
-}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyUnicodeScalarObject.java b/numpy/src/gen/java/org/bytedeco/numpy/PyUnicodeScalarObject.java
index 12219f5a6ae..efacd319874 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyUnicodeScalarObject.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyUnicodeScalarObject.java
@@ -14,6 +14,7 @@
import static org.bytedeco.numpy.global.numpy.*;
+// #ifndef Py_LIMITED_API
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class PyUnicodeScalarObject extends Pointer {
static { Loader.load(); }
@@ -36,5 +37,6 @@ public class PyUnicodeScalarObject extends Pointer {
public native @ByRef PyUnicodeObject base(); public native PyUnicodeScalarObject base(PyUnicodeObject setter);
public native @Cast("Py_UCS4*") IntPointer obval(); public native PyUnicodeScalarObject obval(IntPointer setter);
// #if NPY_FEATURE_VERSION >= NPY_1_20_API_VERSION
+ public native @Cast("char*") BytePointer buffer_fmt(); public native PyUnicodeScalarObject buffer_fmt(BytePointer setter);
// #endif
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/PyVoidScalarObject.java b/numpy/src/gen/java/org/bytedeco/numpy/PyVoidScalarObject.java
index f8a07723435..6652605873a 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/PyVoidScalarObject.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/PyVoidScalarObject.java
@@ -14,6 +14,7 @@
import static org.bytedeco.numpy.global.numpy.*;
+// #endif
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
@@ -36,9 +37,13 @@ public class PyVoidScalarObject extends Pointer {
public native @ByRef PyVarObject ob_base(); public native PyVoidScalarObject ob_base(PyVarObject setter);
public native @Cast("char*") BytePointer obval(); public native PyVoidScalarObject obval(BytePointer setter);
+// #if defined(NPY_INTERNAL_BUILD) && NPY_INTERNAL_BUILD
+// #else
public native PyArray_Descr descr(); public native PyVoidScalarObject descr(PyArray_Descr setter);
+// #endif
public native int flags(); public native PyVoidScalarObject flags(int setter);
public native PyObject base(); public native PyVoidScalarObject base(PyObject setter);
// #if NPY_FEATURE_VERSION >= NPY_1_20_API_VERSION
+ public native Pointer _buffer_info(); public native PyVoidScalarObject _buffer_info(Pointer setter); /* private buffer info, tagged to allow warning */
// #endif
}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/_PyArray_LegacyDescr.java b/numpy/src/gen/java/org/bytedeco/numpy/_PyArray_LegacyDescr.java
new file mode 100644
index 00000000000..f4d2626d2a6
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/_PyArray_LegacyDescr.java
@@ -0,0 +1,63 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+// #else /* 1.x and 2.x compatible version (only shared fields): */
+
+// #endif /* 1.x and 2.x compatible version */
+
+/*
+ * Semi-private struct with additional field of legacy descriptors (must
+ * check NPY_DT_is_legacy before casting/accessing). The struct is also not
+ * valid when running on 1.x (i.e. in public API use).
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class _PyArray_LegacyDescr extends Pointer {
+ static { Loader.load(); }
+ /** Default native constructor. */
+ public _PyArray_LegacyDescr() { super((Pointer)null); allocate(); }
+ /** Native array allocator. Access with {@link Pointer#position(long)}. */
+ public _PyArray_LegacyDescr(long size) { super((Pointer)null); allocateArray(size); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public _PyArray_LegacyDescr(Pointer p) { super(p); }
+ private native void allocate();
+ private native void allocateArray(long size);
+ @Override public _PyArray_LegacyDescr position(long position) {
+ return (_PyArray_LegacyDescr)super.position(position);
+ }
+ @Override public _PyArray_LegacyDescr getPointer(long i) {
+ return new _PyArray_LegacyDescr((Pointer)this).offsetAddress(i);
+ }
+
+ public native @ByRef PyObject ob_base(); public native _PyArray_LegacyDescr ob_base(PyObject setter);
+ public native PyTypeObject typeobj(); public native _PyArray_LegacyDescr typeobj(PyTypeObject setter);
+ public native @Cast("char") byte kind(); public native _PyArray_LegacyDescr kind(byte setter);
+ public native @Cast("char") byte type(); public native _PyArray_LegacyDescr type(byte setter);
+ public native @Cast("char") byte byteorder(); public native _PyArray_LegacyDescr byteorder(byte setter);
+ public native @Cast("char") byte _former_flags(); public native _PyArray_LegacyDescr _former_flags(byte setter);
+ public native int type_num(); public native _PyArray_LegacyDescr type_num(int setter);
+ public native @Cast("npy_uint64") long flags(); public native _PyArray_LegacyDescr flags(long setter);
+ public native @Cast("npy_intp") long elsize(); public native _PyArray_LegacyDescr elsize(long setter);
+ public native @Cast("npy_intp") long alignment(); public native _PyArray_LegacyDescr alignment(long setter);
+ public native PyObject metadata(); public native _PyArray_LegacyDescr metadata(PyObject setter);
+ public native @Cast("npy_hash_t") long hash(); public native _PyArray_LegacyDescr hash(long setter);
+ public native Pointer reserved_null(int i); public native _PyArray_LegacyDescr reserved_null(int i, Pointer setter);
+ @MemberGetter public native @Cast("void**") PointerPointer reserved_null();
+ public native PyArray_ArrayDescr subarray(); public native _PyArray_LegacyDescr subarray(PyArray_ArrayDescr setter);
+ public native PyObject fields(); public native _PyArray_LegacyDescr fields(PyObject setter);
+ public native PyObject names(); public native _PyArray_LegacyDescr names(PyObject setter);
+ public native NpyAuxData c_metadata(); public native _PyArray_LegacyDescr c_metadata(NpyAuxData setter);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/global/numpy.java b/numpy/src/gen/java/org/bytedeco/numpy/global/numpy.java
index 1ca01fc3bb6..ae953199d28 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/global/numpy.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/global/numpy.java
@@ -34,22 +34,23 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
public static final int NPY_SIZEOF_LONGDOUBLE = 16;
public static final int NPY_SIZEOF_COMPLEX_LONGDOUBLE = 32;
public static final int NPY_SIZEOF_PY_INTPTR_T = 8;
+public static final int NPY_SIZEOF_INTP = 8;
+public static final int NPY_SIZEOF_UINTP = 8;
+public static final int NPY_SIZEOF_WCHAR_T = 4;
public static final int NPY_SIZEOF_OFF_T = 8;
public static final int NPY_SIZEOF_PY_LONG_LONG = 8;
public static final int NPY_SIZEOF_LONGLONG = 8;
-public static final int NPY_USE_C99_COMPLEX = 1;
-public static final int NPY_HAVE_COMPLEX_DOUBLE = 1;
-public static final int NPY_HAVE_COMPLEX_FLOAT = 1;
-public static final int NPY_HAVE_COMPLEX_LONG_DOUBLE = 1;
-public static final int NPY_USE_C99_FORMATS = 1;
-
-/* #undef NPY_NO_SIGNAL */
+/*
+ * Defined to 1 or 0. Note that Pyodide hardcodes NPY_NO_SMP (and other defines
+ * in this header) for better cross-compilation, so don't rename them without a
+ * good reason.
+ */
public static final int NPY_NO_SMP = 0;
// #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
-public static final int NPY_ABI_VERSION = 0x01000009;
-public static final int NPY_API_VERSION = 0x00000011;
+public static final int NPY_ABI_VERSION = 0x02000000;
+public static final int NPY_API_VERSION = 0x00000012;
// #ifndef __STDC_FORMAT_MACROS
public static final int __STDC_FORMAT_MACROS = 1;
@@ -76,7 +77,6 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
*/
// #ifdef __APPLE__
// #undef NPY_SIZEOF_LONG
-// #undef NPY_SIZEOF_PY_INTPTR_T
// #ifdef __LP64__
// #else
@@ -131,6 +131,7 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
public static final int NPY_1_23_API_VERSION = 0x00000010;
public static final int NPY_1_24_API_VERSION = 0x00000010;
public static final int NPY_1_25_API_VERSION = 0x00000011;
+public static final int NPY_2_0_API_VERSION = 0x00000012;
/*
@@ -161,7 +162,7 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
* Users of the stable ABI may wish to target the last Python that is not
* end of life. This would be 3.8 at NumPy 1.25 release time.
* 1.17 as default was the choice of oldest-support-numpy at the time and
- * has in practice no limit (comapared to 1.19). Even earlier becomes legacy.
+ * has in practice no limit (compared to 1.19). Even earlier becomes legacy.
*/
// #if defined(NPY_INTERNAL_BUILD) && NPY_INTERNAL_BUILD
// #elif defined(NPY_TARGET_VERSION) && NPY_TARGET_VERSION
@@ -180,6 +181,27 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
// #warning "Requested NumPy target lower than supported NumPy 1.15."
// #endif
+/*
+ * We define a human readable translation to the Python version of NumPy
+ * for error messages (and also to allow grepping the binaries for conda).
+ */
+// #if NPY_FEATURE_VERSION == NPY_1_7_API_VERSION
+ public static final String NPY_FEATURE_VERSION_STRING = "1.7";
+// #elif NPY_FEATURE_VERSION == NPY_1_8_API_VERSION
+// #elif NPY_FEATURE_VERSION == NPY_1_9_API_VERSION
+// #elif NPY_FEATURE_VERSION == NPY_1_10_API_VERSION /* also 1.11, 1.12 */
+// #elif NPY_FEATURE_VERSION == NPY_1_13_API_VERSION
+// #elif NPY_FEATURE_VERSION == NPY_1_14_API_VERSION /* also 1.15 */
+// #elif NPY_FEATURE_VERSION == NPY_1_16_API_VERSION /* also 1.17, 1.18, 1.19 */
+// #elif NPY_FEATURE_VERSION == NPY_1_20_API_VERSION /* also 1.21 */
+// #elif NPY_FEATURE_VERSION == NPY_1_22_API_VERSION
+// #elif NPY_FEATURE_VERSION == NPY_1_23_API_VERSION /* also 1.24 */
+// #elif NPY_FEATURE_VERSION == NPY_1_25_API_VERSION
+// #elif NPY_FEATURE_VERSION == NPY_2_0_API_VERSION
+// #else
+// #error "Missing version string define for new NumPy version."
+// #endif
+
// #endif /* NUMPY_CORE_INCLUDE_NUMPY_NPY_NUMPYCONFIG_H_ */
@@ -361,8 +383,8 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
NPY_CPU_BIG = 2;
/*
- * This is to typedef npy_intp to the appropriate pointer size for this
- * platform. Py_intptr_t, Py_uintptr_t are defined in pyport.h.
+ * This is to typedef npy_intp to the appropriate size for Py_ssize_t.
+ * (Before NumPy 2.0 we used Py_intptr_t and Py_uintptr_t from `pyport.h`.)
*/
/*
@@ -372,8 +394,6 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
public static final int NPY_SIZEOF_BYTE = 1;
public static final int NPY_SIZEOF_DATETIME = 8;
public static final int NPY_SIZEOF_TIMEDELTA = 8;
-public static final int NPY_SIZEOF_INTP = NPY_SIZEOF_PY_INTPTR_T;
-public static final int NPY_SIZEOF_UINTP = NPY_SIZEOF_PY_INTPTR_T;
public static final int NPY_SIZEOF_HALF = 2;
public static final int NPY_SIZEOF_CFLOAT = NPY_SIZEOF_COMPLEX_FLOAT;
public static final int NPY_SIZEOF_CDOUBLE = NPY_SIZEOF_COMPLEX_DOUBLE;
@@ -391,33 +411,28 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
* functions use different formatting codes that are portably specified
* according to the Python documentation. See issue gh-2388.
*/
-// #if NPY_SIZEOF_PY_INTPTR_T == NPY_SIZEOF_INT
-// #elif NPY_SIZEOF_PY_INTPTR_T == NPY_SIZEOF_LONG
-// #elif defined(PY_LONG_LONG) && (NPY_SIZEOF_PY_INTPTR_T == NPY_SIZEOF_LONGLONG)
+// #if NPY_SIZEOF_INTP == NPY_SIZEOF_LONG
public static native @MemberGetter long NPY_INTP();
public static final long NPY_INTP = NPY_INTP();
public static native @MemberGetter long NPY_UINTP();
public static final long NPY_UINTP = NPY_UINTP();
-// #define PyIntpArrType_Type PyLongLongArrType_Type
-// #define PyUIntpArrType_Type PyULongLongArrType_Type
+// #define PyIntpArrType_Type PyLongArrType_Type
+// #define PyUIntpArrType_Type PyULongArrType_Type
public static native @MemberGetter long NPY_MAX_INTP();
public static final long NPY_MAX_INTP = NPY_MAX_INTP();
public static native @MemberGetter long NPY_MIN_INTP();
public static final long NPY_MIN_INTP = NPY_MIN_INTP();
public static native @MemberGetter long NPY_MAX_UINTP();
public static final long NPY_MAX_UINTP = NPY_MAX_UINTP();
- public static final String NPY_INTP_FMT = "lld";
-// #endif
-
-/*
- * We can only use C99 formats for npy_int_p if it is the same as
- * intp_t, hence the condition on HAVE_UNITPTR_T
- */
-// #if (NPY_USE_C99_FORMATS) == 1
-// && (defined HAVE_UINTPTR_T)
-// && (defined HAVE_INTTYPES_H)
-// #include
-// #undef NPY_INTP_FMT
+ public static final String NPY_INTP_FMT = "ld";
+// #elif NPY_SIZEOF_INTP == NPY_SIZEOF_INT
+// #define PyIntpArrType_Type PyIntArrType_Type
+// #define PyUIntpArrType_Type PyUIntArrType_Type
+// #elif defined(PY_LONG_LONG) && (NPY_SIZEOF_INTP == NPY_SIZEOF_LONGLONG)
+// #define PyIntpArrType_Type PyLongLongArrType_Type
+// #define PyUIntpArrType_Type PyULongLongArrType_Type
+// #else
+// #error "Failed to correctly define NPY_INTP and NPY_UINTP"
// #endif
@@ -465,8 +480,9 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
* See https://github.com/numpy/numpy/issues/20348
*/
// #if NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE
- public static final String NPY_LONGDOUBLE_FMT = "g";
// #else
+ public static final String NPY_LONGDOUBLE_FMT = "Lg";
+// #define longdouble_t long double
// #endif
// #ifndef Py_USING_UNICODE
@@ -474,38 +490,28 @@ public class numpy extends org.bytedeco.numpy.presets.numpy {
// #endif
/* These are for completeness */
-public static final int NPY_SIZEOF_HASH_T = NPY_SIZEOF_INTP;
-
-/*
- * Disabling C99 complex usage: a lot of C code in numpy/scipy rely on being
- * able to do .real/.imag. Will have to convert code first.
- */
-// #if 0
-// #endif
-// #if NPY_SIZEOF_COMPLEX_DOUBLE != 2 * NPY_SIZEOF_DOUBLE
-// #error npy_cdouble definition is not compatible with C99 complex definition !
-// Please contact NumPy maintainers and give detailed information about your
-// compiler and platform
+public static native @MemberGetter int NPY_SIZEOF_HASH_T();
+public static final int NPY_SIZEOF_HASH_T = NPY_SIZEOF_HASH_T();
// Targeting ../npy_cdouble.java
-
-// #if NPY_SIZEOF_COMPLEX_FLOAT != 2 * NPY_SIZEOF_FLOAT
-// #error npy_cfloat definition is not compatible with C99 complex definition !
-// Please contact NumPy maintainers and give detailed information about your
-// compiler and platform
// Targeting ../npy_cfloat.java
-
-// #if NPY_SIZEOF_COMPLEX_LONGDOUBLE != 2 * NPY_SIZEOF_LONGDOUBLE
-// #error npy_clongdouble definition is not compatible with C99 complex definition !
-// Please contact NumPy maintainers and give detailed information about your
-// compiler and platform
// Targeting ../npy_clongdouble.java
+// #else
+
+// #include
+
+// #if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+// #else /* !defined(_MSC_VER) || defined(__INTEL_COMPILER) */
+// #endif
+
+// #endif
+
/*
* numarray-style bit-width typedefs
*/
@@ -1176,66 +1182,6 @@ It also looks like Python itself uses sizeof(char) quite a
// #endif /* NUMPY_CORE_INCLUDE_NUMPY_NPY_ENDIAN_H_ */
-// Parsed from npy_interrupt.h
-
-/*
- * This API is only provided because it is part of publicly exported
- * headers. Its use is considered DEPRECATED, and it will be removed
- * eventually.
- * (This includes the _PyArray_SigintHandler and _PyArray_GetSigintBuf
- * functions which are however, public API, and not headers.)
- *
- * Instead of using these non-threadsafe macros consider periodically
- * querying `PyErr_CheckSignals()` or `PyOS_InterruptOccurred()` will work.
- * Both of these require holding the GIL, although cpython could add a
- * version of `PyOS_InterruptOccurred()` which does not. Such a version
- * actually exists as private API in Python 3.10, and backported to 3.9 and 3.8,
- * see also https://bugs.python.org/issue41037 and
- * https://github.com/python/cpython/pull/20599).
- */
-
-// #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_INTERRUPT_H_
-// #define NUMPY_CORE_INCLUDE_NUMPY_NPY_INTERRUPT_H_
-
-// #ifndef NPY_NO_SIGNAL
-
-// #include
-// #include
-
-// #ifndef sigsetjmp
-
-// #define NPY_SIGSETJMP(arg1, arg2) setjmp(arg1)
-// #define NPY_SIGLONGJMP(arg1, arg2) longjmp(arg1, arg2)
-// #define NPY_SIGJMP_BUF jmp_buf
-
-// #else
-
-// #define NPY_SIGSETJMP(arg1, arg2) sigsetjmp(arg1, arg2)
-// #define NPY_SIGLONGJMP(arg1, arg2) siglongjmp(arg1, arg2)
-// #define NPY_SIGJMP_BUF sigjmp_buf
-
-// #endif
-
-// # define NPY_SIGINT_ON {
-// PyOS_sighandler_t _npy_sig_save;
-// _npy_sig_save = PyOS_setsig(SIGINT, _PyArray_SigintHandler);
-// if (NPY_SIGSETJMP(*((NPY_SIGJMP_BUF *)_PyArray_GetSigintBuf()),
-// 1) == 0) {
-
-// # define NPY_SIGINT_OFF }
-// PyOS_setsig(SIGINT, _npy_sig_save);
-// }
-
-// #else /* NPY_NO_SIGNAL */
-
-// #define NPY_SIGINT_ON
-// #define NPY_SIGINT_OFF
-
-// #endif /* HAVE_SIGSETJMP */
-
-// #endif /* NUMPY_CORE_INCLUDE_NUMPY_NPY_INTERRUPT_H_ */
-
-
// Parsed from npy_math.h
// #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_MATH_H_
@@ -1256,6 +1202,9 @@ It also looks like Python itself uses sizeof(char) quite a
// #ifdef __cplusplus
// #endif
+// #define PyArray_MAX(a,b) (((a)>(b))?(a):(b))
+// #define PyArray_MIN(a,b) (((a)<(b))?(a):(b))
+
/*
* NAN and INFINITY like macros (same behavior as glibc for NAN, same as C99
* for INFINITY)
@@ -1469,9 +1418,7 @@ It also looks like Python itself uses sizeof(char) quite a
@NoException public static native @Cast("npy_longdouble") double npy_log2l(@Cast("npy_longdouble") double x);
@NoException public static native @Cast("npy_longdouble") double npy_atan2l(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double y);
@NoException public static native @Cast("npy_longdouble") double npy_powl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double y);
-@NoException public static native @Cast("npy_longdouble") double npy_modfl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble*") DoublePointer y);
-@NoException public static native @Cast("npy_longdouble") double npy_modfl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble*") DoubleBuffer y);
-@NoException public static native @Cast("npy_longdouble") double npy_modfl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble*") double[] y);
+@NoException public static native @Cast("npy_longdouble") double npy_modfl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble*") Pointer y);
/* Mandatory C99 double math funcs, no blocklisting or fixups */
/* defined for legacy reasons, should be deprecated at some point */
@@ -1504,11 +1451,7 @@ It also looks like Python itself uses sizeof(char) quite a
@NoException public static native @Cast("npy_longdouble") double npy_logaddexpl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double y);
@NoException public static native @Cast("npy_longdouble") double npy_logaddexp2l(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double y);
@NoException public static native @Cast("npy_longdouble") double npy_divmodl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double y,
- @Cast("npy_longdouble*") DoublePointer modulus);
-@NoException public static native @Cast("npy_longdouble") double npy_divmodl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double y,
- @Cast("npy_longdouble*") DoubleBuffer modulus);
-@NoException public static native @Cast("npy_longdouble") double npy_divmodl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double y,
- @Cast("npy_longdouble*") double[] modulus);
+ @Cast("npy_longdouble*") Pointer modulus);
@NoException public static native @Cast("npy_longdouble") double npy_heavisidel(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double h0);
@@ -1517,57 +1460,38 @@ It also looks like Python itself uses sizeof(char) quite a
* Complex declarations
*/
-/*
- * C99 specifies that complex numbers have the same representation as
- * an array of two elements, where the first element is the real part
- * and the second element is the imaginary part.
- */
-// #define __NPY_CPACK_IMP(x, y, type, ctype)
-// union {
-// ctype z;
-// type a[2];
-// } z1;
-//
-// z1.a[0] = (x);
-// z1.a[1] = (y);
-//
-// return z1.z;
+@NoException public static native double npy_creal(@Const @ByVal npy_cdouble z);
-@NoException public static native @ByVal npy_cdouble npy_cpack(double x, double y);
+@NoException public static native void npy_csetreal(npy_cdouble z, double r);
-@NoException public static native @ByVal npy_cfloat npy_cpackf(float x, float y);
+@NoException public static native double npy_cimag(@Const @ByVal npy_cdouble z);
-@NoException public static native @ByVal npy_clongdouble npy_cpackl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double y);
-// #undef __NPY_CPACK_IMP
+@NoException public static native void npy_csetimag(npy_cdouble z, double i);
-/*
- * Same remark as above, but in the other direction: extract first/second
- * member of complex number, assuming a C99-compatible representation
- *
- * Those are defineds as static inline, and such as a reasonable compiler would
- * most likely compile this to one or two instructions (on CISC at least)
- */
-// #define __NPY_CEXTRACT_IMP(z, index, type, ctype)
-// union {
-// ctype z;
-// type a[2];
-// } __z_repr;
-// __z_repr.z = z;
-//
-// return __z_repr.a[index];
+@NoException public static native float npy_crealf(@Const @ByVal npy_cfloat z);
+
+@NoException public static native void npy_csetrealf(npy_cfloat z, float r);
+
+@NoException public static native float npy_cimagf(@Const @ByVal npy_cfloat z);
+
+@NoException public static native void npy_csetimagf(npy_cfloat z, float i);
-@NoException public static native double npy_creal(@ByVal npy_cdouble z);
+@NoException public static native @Cast("npy_longdouble") double npy_creall(@Const @ByVal npy_clongdouble z);
-@NoException public static native double npy_cimag(@ByVal npy_cdouble z);
+@NoException public static native @Cast("npy_longdouble") double npy_cimagl(@Const @ByVal npy_clongdouble z);
-@NoException public static native float npy_crealf(@ByVal npy_cfloat z);
+// #define NPY_CSETREAL(z, r) npy_csetreal(z, r)
+// #define NPY_CSETIMAG(z, i) npy_csetimag(z, i)
+// #define NPY_CSETREALF(z, r) npy_csetrealf(z, r)
+// #define NPY_CSETIMAGF(z, i) npy_csetimagf(z, i)
+// #define NPY_CSETREALL(z, r) npy_csetreall(z, r)
+// #define NPY_CSETIMAGL(z, i) npy_csetimagl(z, i)
-@NoException public static native float npy_cimagf(@ByVal npy_cfloat z);
+@NoException public static native @ByVal npy_cdouble npy_cpack(double x, double y);
-@NoException public static native @Cast("npy_longdouble") double npy_creall(@ByVal npy_clongdouble z);
+@NoException public static native @ByVal npy_cfloat npy_cpackf(float x, float y);
-@NoException public static native @Cast("npy_longdouble") double npy_cimagl(@ByVal npy_clongdouble z);
-// #undef __NPY_CEXTRACT_IMP
+@NoException public static native @ByVal npy_clongdouble npy_cpackl(@Cast("npy_longdouble") double x, @Cast("npy_longdouble") double y);
/*
* Double precision complex functions
@@ -1821,11 +1745,6 @@ It also looks like Python itself uses sizeof(char) quite a
// #define Py_ARRAYOBJECT_H
// #include "ndarrayobject.h"
-// #include "npy_interrupt.h"
-
-// #ifdef NPY_NO_PREFIX
-// #include "noprefix.h"
-// #endif
// #endif /* NUMPY_CORE_INCLUDE_NUMPY_ARRAYOBJECT_H_ */
@@ -1931,10 +1850,13 @@ It also looks like Python itself uses sizeof(char) quite a
// #define PyArrayScalar_New(cls)
// Py##cls##ArrType_Type.tp_alloc(&Py##cls##ArrType_Type, 0)
+// #ifndef Py_LIMITED_API
+/* For the limited API, use PyArray_ScalarAsCtype instead */
// #define PyArrayScalar_VAL(obj, cls)
// ((Py##cls##ScalarObject *)obj)->obval
// #define PyArrayScalar_ASSIGN(obj, cls, val)
// PyArrayScalar_VAL(obj, cls) = val
+// #endif
// #endif /* NUMPY_CORE_INCLUDE_NUMPY_ARRAYSCALARS_H_ */
@@ -1951,8 +1873,8 @@ It also looks like Python itself uses sizeof(char) quite a
// #define NPY_NO_EXPORT NPY_VISIBILITY_HIDDEN
-/* Only use thread if configured in config and python supports it */
-// #if defined WITH_THREAD && !NPY_NO_SMP
+/* Always allow threading unless it was explicitly disabled at build time */
+// #if !NPY_NO_SMP
public static final int NPY_ALLOW_THREADS = 1;
// #else
// #endif
@@ -1961,14 +1883,6 @@ It also looks like Python itself uses sizeof(char) quite a
// #define __has_extension(x) 0
// #endif
-// #if !defined(_NPY_NO_DEPRECATIONS) &&
-// ((defined(__GNUC__)&& __GNUC__ >= 6) ||
-// __has_extension(attribute_deprecated_with_message))
-// #define NPY_ATTR_DEPRECATE(text) __attribute__ ((deprecated (text)))
-// #else
-// #define NPY_ATTR_DEPRECATE(text)
-// #endif
-
/*
* There are several places in the code where an array of dimensions
* is allocated statically. This is the size of that static
@@ -1977,10 +1891,17 @@ It also looks like Python itself uses sizeof(char) quite a
* The array creation itself could have arbitrary dimensions but all
* the places where static allocation is used would need to be changed
* to dynamic (including inside of several structures)
+ *
+ * As of NumPy 2.0, we strongly discourage the downstream use of NPY_MAXDIMS,
+ * but since auditing everything seems a big ask, define it as 64.
+ * A future version could:
+ * - Increase or remove the limit and require recompilation (like 2.0 did)
+ * - Deprecate or remove the macro but keep the limit (at basically any time)
*/
-
-public static final int NPY_MAXDIMS = 32;
-public static final int NPY_MAXARGS = 32;
+public static final int NPY_MAXDIMS = 64;
+/* We cannot change this as it would break ABI: */
+public static final int NPY_MAXDIMS_LEGACY_ITERS = 32;
+/* NPY_MAXARGS is version dependent and defined in npy_2_compat.h */
/* Used for Converter Functions "O&" code in ParseTuple */
public static final int NPY_FAIL = 0;
@@ -2005,16 +1926,28 @@ It also looks like Python itself uses sizeof(char) quite a
*/
NPY_DATETIME = 21, NPY_TIMEDELTA = 22, NPY_HALF = 23,
- NPY_NTYPES = 24,
+ NPY_CHAR = 24, /* Deprecated, will raise if used */
+
+ /* The number of *legacy* dtypes */
+ NPY_NTYPES_LEGACY = 24,
+
+ /* assign a high value to avoid changing this in the
+ future when new dtypes are added */
NPY_NOTYPE = 25,
- NPY_CHAR = 26,
+
NPY_USERDEF = 256, /* leave room for characters */
/* The number of types not including the new 1.6 types */
- NPY_NTYPES_ABI_COMPATIBLE = 21;
-// #if defined(_MSC_VER) && !defined(__clang__)
-// #pragma deprecated(NPY_CHAR)
-// #endif
+ NPY_NTYPES_ABI_COMPATIBLE = 21,
+
+ /*
+ * New DTypes which do not share the legacy layout
+ * (added after NumPy 2.0). VSTRING is the first of these
+ * we may open up a block for user-defined dtypes in the
+ * future.
+ */
+ NPY_VSTRING = 2056;
+
/* basetype array priority */
public static final double NPY_PRIORITY = 0.0;
@@ -2055,7 +1988,7 @@ It also looks like Python itself uses sizeof(char) quite a
NPY_CLONGDOUBLELTR = 'G',
NPY_OBJECTLTR = 'O',
NPY_STRINGLTR = 'S',
- NPY_STRINGLTR2 = 'a',
+ NPY_DEPRECATED_STRINGLTR2 = 'a',
NPY_UNICODELTR = 'U',
NPY_VOIDLTR = 'V',
NPY_DATETIMELTR = 'M',
@@ -2063,13 +1996,19 @@ It also looks like Python itself uses sizeof(char) quite a
NPY_CHARLTR = 'c',
/*
- * No Descriptor, just a define -- this let's
- * Python users specify an array of integers
- * large enough to hold a pointer on the
- * platform
+ * New non-legacy DTypes
+ */
+ NPY_VSTRINGLTR = 'T',
+
+ /*
+ * Note, we removed `NPY_INTPLTR` due to changing its definition
+ * to 'n', rather than 'p'. On any typical platform this is the
+ * same integer. 'n' should be used for the `np.intp` with the same
+ * size as `size_t` while 'p' remains pointer sized.
+ *
+ * 'p', 'P', 'n', and 'N' are valid and defined explicitly
+ * in `arraytypes.c.src`.
*/
- NPY_INTPLTR = 'p',
- NPY_UINTPLTR = 'P',
/*
* These are for dtype 'kinds', not dtype 'typecodes'
@@ -2090,6 +2029,7 @@ It also looks like Python itself uses sizeof(char) quite a
*/
/** enum NPY_SORTKIND */
public static final int
+ _NPY_SORT_UNDEFINED = -1,
NPY_QUICKSORT = 0,
NPY_HEAPSORT = 1,
NPY_MERGESORT = 2,
@@ -2235,6 +2175,7 @@ It also looks like Python itself uses sizeof(char) quite a
/* Raise an exception for non-business days. */
NPY_BUSDAY_RAISE = NPY_BUSDAY_BACKWARD + 4;
+
/************************************************************
* NumPy Auxiliary Data for inner loops, sort functions, etc.
************************************************************/
@@ -2343,27 +2284,12 @@ It also looks like Python itself uses sizeof(char) quite a
// Targeting ../PyArray_ArgSortFunc.java
-// Targeting ../PyArray_PartitionFunc.java
-
-
-// Targeting ../PyArray_ArgPartitionFunc.java
-
-
// Targeting ../PyArray_FillWithScalarFunc.java
// Targeting ../PyArray_ScalarKindFunc.java
-// Targeting ../PyArray_FastClipFunc.java
-
-
-// Targeting ../PyArray_FastPutmaskFunc.java
-
-
-// Targeting ../PyArray_FastTakeFunc.java
-
-
// Targeting ../PyArray_Dims.java
@@ -2371,6 +2297,7 @@ It also looks like Python itself uses sizeof(char) quite a
+
/* The item must be reference counted when it is inserted or extracted. */
public static final int NPY_ITEM_REFCOUNT = 0x01;
/* Same as needing REFCOUNT */
@@ -2400,13 +2327,13 @@ It also looks like Python itself uses sizeof(char) quite a
public static final int NPY_OBJECT_DTYPE_FLAGS = (NPY_LIST_PICKLE | NPY_USE_GETITEM |
NPY_ITEM_IS_POINTER | NPY_ITEM_REFCOUNT |
NPY_NEEDS_INIT | NPY_NEEDS_PYAPI);
+// Targeting ../PyArray_Descr.java
-// #define PyDataType_FLAGCHK(dtype, flag)
-// (((dtype)->flags & (flag)) == (flag))
-// #define PyDataType_REFCHK(dtype)
-// PyDataType_FLAGCHK(dtype, NPY_ITEM_REFCOUNT)
-// Targeting ../PyArray_Descr.java
+// Targeting ../_PyArray_LegacyDescr.java
+
+
+// Targeting ../PyArray_DescrProto.java
// Targeting ../PyArray_ArrayDescr.java
@@ -2433,9 +2360,6 @@ It also looks like Python itself uses sizeof(char) quite a
* PyArrayObject field access is deprecated as of NumPy 1.7.
*/
// #else
-// Targeting ../PyArrayFlagsObject.java
-
-
// Targeting ../PyArray_Chunk.java
@@ -2620,19 +2544,6 @@ It also looks like Python itself uses sizeof(char) quite a
/* buffer stress test size: */
/*#define NPY_BUFSIZE 17*/
-// #define PyArray_MAX(a,b) (((a)>(b))?(a):(b))
-// #define PyArray_MIN(a,b) (((a)<(b))?(a):(b))
-// #define PyArray_CLT(p,q) ((((p).real==(q).real) ? ((p).imag < (q).imag) :
-// ((p).real < (q).real)))
-// #define PyArray_CGT(p,q) ((((p).real==(q).real) ? ((p).imag > (q).imag) :
-// ((p).real > (q).real)))
-// #define PyArray_CLE(p,q) ((((p).real==(q).real) ? ((p).imag <= (q).imag) :
-// ((p).real <= (q).real)))
-// #define PyArray_CGE(p,q) ((((p).real==(q).real) ? ((p).imag >= (q).imag) :
-// ((p).real >= (q).real)))
-// #define PyArray_CEQ(p,q) (((p).real==(q).real) && ((p).imag == (q).imag))
-// #define PyArray_CNE(p,q) (((p).real!=(q).real) || ((p).imag != (q).imag))
-
/*
* C API: consists of Macros and functions. The MACROS are defined
* here.
@@ -2657,13 +2568,6 @@ It also looks like Python itself uses sizeof(char) quite a
// #define NPY_BEGIN_THREADS_THRESHOLDED(loop_size) do { if ((loop_size) > 500)
// { _save = PyEval_SaveThread();} } while (0);
-// #define NPY_BEGIN_THREADS_DESCR(dtype)
-// do {if (!(PyDataType_FLAGCHK((dtype), NPY_NEEDS_PYAPI)))
-// NPY_BEGIN_THREADS;} while (0);
-
-// #define NPY_END_THREADS_DESCR(dtype)
-// do {if (!(PyDataType_FLAGCHK((dtype), NPY_NEEDS_PYAPI)))
-// NPY_END_THREADS; } while (0);
// #define NPY_ALLOW_C_API_DEF PyGILState_STATE __save__;
// #define NPY_ALLOW_C_API do {__save__ = PyGILState_Ensure();} while (0);
@@ -2798,7 +2702,7 @@ It also looks like Python itself uses sizeof(char) quite a
// _PyArray_ITER_NEXT1(_PyAIT(it));
// }
// else if (_PyAIT(it)->contiguous)
-// _PyAIT(it)->dataptr += PyArray_DESCR(_PyAIT(it)->ao)->elsize;
+// _PyAIT(it)->dataptr += PyArray_ITEMSIZE(_PyAIT(it)->ao);
// else if (_PyAIT(it)->nd_m1 == 1) {
// _PyArray_ITER_NEXT2(_PyAIT(it));
// }
@@ -2851,7 +2755,7 @@ It also looks like Python itself uses sizeof(char) quite a
// }
// else if (_PyAIT(it)->contiguous)
// _PyAIT(it)->dataptr = PyArray_BYTES(_PyAIT(it)->ao) +
-// __npy_ind * PyArray_DESCR(_PyAIT(it)->ao)->elsize;
+// __npy_ind * PyArray_ITEMSIZE(_PyAIT(it)->ao);
// else {
// _PyAIT(it)->dataptr = PyArray_BYTES(_PyAIT(it)->ao);
// for (__npy_i = 0; __npy_i<=_PyAIT(it)->nd_m1;
@@ -2914,9 +2818,25 @@ It also looks like Python itself uses sizeof(char) quite a
// #define PyArray_MultiIter_NOTDONE(multi)
// (_PyMIT(multi)->index < _PyMIT(multi)->size)
-// Targeting ../PyArrayMapIterObject.java
+@NoException public static native int PyArray_MultiIter_NUMITER(PyArrayMultiIterObject multi);
+
+
+@NoException public static native @Cast("npy_intp") long PyArray_MultiIter_SIZE(PyArrayMultiIterObject multi);
+
+
+@NoException public static native @Cast("npy_intp") long PyArray_MultiIter_INDEX(PyArrayMultiIterObject multi);
+
+
+@NoException public static native int PyArray_MultiIter_NDIM(PyArrayMultiIterObject multi);
+
+
+@NoException public static native @Cast("npy_intp*") SizeTPointer PyArray_MultiIter_DIMS(PyArrayMultiIterObject multi);
+
+
+@NoException public static native @Cast("void**") PointerPointer PyArray_MultiIter_ITERS(PyArrayMultiIterObject multi);
+
/** enum */
public static final int
@@ -2951,6 +2871,7 @@ It also looks like Python itself uses sizeof(char) quite a
/* The default array type */
public static final int NPY_DEFAULT_TYPE = NPY_DOUBLE;
+/* default integer type defined in npy_2_compat header */
/*
* All sorts of useful ways to look into a PyArrayObject. It is recommended
@@ -2973,84 +2894,34 @@ It also looks like Python itself uses sizeof(char) quite a
// #define PyArray_FORTRAN_IF(m) ((PyArray_CHKFLAGS(m, NPY_ARRAY_F_CONTIGUOUS) ?
// NPY_ARRAY_F_CONTIGUOUS : 0))
-// #if (defined(NPY_NO_DEPRECATED_API) && (NPY_1_7_API_VERSION <= NPY_NO_DEPRECATED_API))
-/*
- * Changing access macros into functions, to allow for future hiding
- * of the internal memory layout. This later hiding will allow the 2.x series
- * to change the internal representation of arrays without affecting
- * ABI compatibility.
- */
-
@NoException public static native int PyArray_NDIM(@Const PyArrayObject arr);
-@NoException public static native Pointer PyArray_DATA(PyArrayObject arr);
+@NoException public static native Pointer PyArray_DATA(@Const PyArrayObject arr);
-@NoException public static native @Cast("char*") BytePointer PyArray_BYTES(PyArrayObject arr);
+@NoException public static native @Cast("char*") BytePointer PyArray_BYTES(@Const PyArrayObject arr);
-@NoException public static native @Cast("npy_intp*") SizeTPointer PyArray_DIMS(PyArrayObject arr);
+@NoException public static native @Cast("npy_intp*") SizeTPointer PyArray_DIMS(@Const PyArrayObject arr);
-@NoException public static native @Cast("npy_intp*") SizeTPointer PyArray_STRIDES(PyArrayObject arr);
+@NoException public static native @Cast("npy_intp*") SizeTPointer PyArray_STRIDES(@Const PyArrayObject arr);
@NoException public static native @Cast("npy_intp") long PyArray_DIM(@Const PyArrayObject arr, int idim);
@NoException public static native @Cast("npy_intp") long PyArray_STRIDE(@Const PyArrayObject arr, int istride);
-@NoException public static native PyObject PyArray_BASE(PyArrayObject arr);
+@NoException public static native PyObject PyArray_BASE(@Const PyArrayObject arr);
-@NoException public static native PyArray_Descr PyArray_DESCR(PyArrayObject arr);
+@NoException public static native PyArray_Descr PyArray_DESCR(@Const PyArrayObject arr);
@NoException public static native int PyArray_FLAGS(@Const PyArrayObject arr);
-@NoException public static native @Cast("npy_intp") long PyArray_ITEMSIZE(@Const PyArrayObject arr);
@NoException public static native int PyArray_TYPE(@Const PyArrayObject arr);
@NoException public static native int PyArray_CHKFLAGS(@Const PyArrayObject arr, int flags);
-@NoException public static native PyObject PyArray_GETITEM(@Const PyArrayObject arr, @Cast("const char*") BytePointer itemptr);
-@NoException public static native PyObject PyArray_GETITEM(@Const PyArrayObject arr, String itemptr);
-
-/*
- * SETITEM should only be used if it is known that the value is a scalar
- * and of a type understood by the arrays dtype.
- * Use `PyArray_Pack` if the value may be of a different dtype.
- */
-@NoException public static native int PyArray_SETITEM(PyArrayObject arr, @Cast("char*") BytePointer itemptr, PyObject v);
-@NoException public static native int PyArray_SETITEM(PyArrayObject arr, @Cast("char*") ByteBuffer itemptr, PyObject v);
-@NoException public static native int PyArray_SETITEM(PyArrayObject arr, @Cast("char*") byte[] itemptr, PyObject v);
+@NoException public static native PyArray_Descr PyArray_DTYPE(@Const PyArrayObject arr);
-// #else
-
-/* These macros are deprecated as of NumPy 1.7. */
-// #define PyArray_NDIM(obj) (((PyArrayObject_fields *)(obj))->nd)
-// #define PyArray_BYTES(obj) (((PyArrayObject_fields *)(obj))->data)
-// #define PyArray_DATA(obj) ((void *)((PyArrayObject_fields *)(obj))->data)
-// #define PyArray_DIMS(obj) (((PyArrayObject_fields *)(obj))->dimensions)
-// #define PyArray_STRIDES(obj) (((PyArrayObject_fields *)(obj))->strides)
-// #define PyArray_DIM(obj,n) (PyArray_DIMS(obj)[n])
-// #define PyArray_STRIDE(obj,n) (PyArray_STRIDES(obj)[n])
-// #define PyArray_BASE(obj) (((PyArrayObject_fields *)(obj))->base)
-// #define PyArray_DESCR(obj) (((PyArrayObject_fields *)(obj))->descr)
-// #define PyArray_FLAGS(obj) (((PyArrayObject_fields *)(obj))->flags)
-// #define PyArray_CHKFLAGS(m, FLAGS)
-// ((((PyArrayObject_fields *)(m))->flags & (FLAGS)) == (FLAGS))
-// #define PyArray_ITEMSIZE(obj)
-// (((PyArrayObject_fields *)(obj))->descr->elsize)
-// #define PyArray_TYPE(obj)
-// (((PyArrayObject_fields *)(obj))->descr->type_num)
-// #define PyArray_GETITEM(obj,itemptr)
-// PyArray_DESCR(obj)->f->getitem((char *)(itemptr),
-// (PyArrayObject *)(obj))
-
-// #define PyArray_SETITEM(obj,itemptr,v)
-// PyArray_DESCR(obj)->f->setitem((PyObject *)(v),
-// (char *)(itemptr),
-// (PyArrayObject *)(obj))
-// #endif
-
-@NoException public static native PyArray_Descr PyArray_DTYPE(PyArrayObject arr);
-
-@NoException public static native @Cast("npy_intp*") SizeTPointer PyArray_SHAPE(PyArrayObject arr);
+@NoException public static native @Cast("npy_intp*") SizeTPointer PyArray_SHAPE(@Const PyArrayObject arr);
/*
* Enables the specified array flags. Does no checking,
@@ -3065,6 +2936,7 @@ It also looks like Python itself uses sizeof(char) quite a
@NoException public static native void PyArray_CLEARFLAGS(PyArrayObject arr, int flags);
// #if NPY_FEATURE_VERSION >= NPY_1_22_API_VERSION
+
// #endif
// #define PyTypeNum_ISBOOL(type) ((type) == NPY_BOOL)
@@ -3097,12 +2969,6 @@ It also looks like Python itself uses sizeof(char) quite a
// #define PyTypeNum_ISCOMPLEX(type) (((type) >= NPY_CFLOAT) &&
// ((type) <= NPY_CLONGDOUBLE))
-// #define PyTypeNum_ISPYTHON(type) (((type) == NPY_LONG) ||
-// ((type) == NPY_DOUBLE) ||
-// ((type) == NPY_CDOUBLE) ||
-// ((type) == NPY_BOOL) ||
-// ((type) == NPY_OBJECT ))
-
// #define PyTypeNum_ISFLEXIBLE(type) (((type) >=NPY_STRING) &&
// ((type) <=NPY_VOID))
@@ -3119,6 +2985,7 @@ It also looks like Python itself uses sizeof(char) quite a
// #define PyTypeNum_ISOBJECT(type) ((type) == NPY_OBJECT)
+// #define PyDataType_ISLEGACY(dtype) ((dtype)->type_num < NPY_VSTRING && ((dtype)->type_num >= 0))
// #define PyDataType_ISBOOL(obj) PyTypeNum_ISBOOL(((PyArray_Descr*)(obj))->type_num)
// #define PyDataType_ISUNSIGNED(obj) PyTypeNum_ISUNSIGNED(((PyArray_Descr*)(obj))->type_num)
// #define PyDataType_ISSIGNED(obj) PyTypeNum_ISSIGNED(((PyArray_Descr*)(obj))->type_num)
@@ -3127,17 +2994,18 @@ It also looks like Python itself uses sizeof(char) quite a
// #define PyDataType_ISNUMBER(obj) PyTypeNum_ISNUMBER(((PyArray_Descr*)(obj))->type_num)
// #define PyDataType_ISSTRING(obj) PyTypeNum_ISSTRING(((PyArray_Descr*)(obj))->type_num)
// #define PyDataType_ISCOMPLEX(obj) PyTypeNum_ISCOMPLEX(((PyArray_Descr*)(obj))->type_num)
-// #define PyDataType_ISPYTHON(obj) PyTypeNum_ISPYTHON(((PyArray_Descr*)(obj))->type_num)
// #define PyDataType_ISFLEXIBLE(obj) PyTypeNum_ISFLEXIBLE(((PyArray_Descr*)(obj))->type_num)
// #define PyDataType_ISDATETIME(obj) PyTypeNum_ISDATETIME(((PyArray_Descr*)(obj))->type_num)
// #define PyDataType_ISUSERDEF(obj) PyTypeNum_ISUSERDEF(((PyArray_Descr*)(obj))->type_num)
// #define PyDataType_ISEXTENDED(obj) PyTypeNum_ISEXTENDED(((PyArray_Descr*)(obj))->type_num)
// #define PyDataType_ISOBJECT(obj) PyTypeNum_ISOBJECT(((PyArray_Descr*)(obj))->type_num)
-// #define PyDataType_HASFIELDS(obj) (((PyArray_Descr *)(obj))->names != NULL)
-// #define PyDataType_HASSUBARRAY(dtype) ((dtype)->subarray != NULL)
-// #define PyDataType_ISUNSIZED(dtype) ((dtype)->elsize == 0 &&
-// !PyDataType_HASFIELDS(dtype))
// #define PyDataType_MAKEUNSIZED(dtype) ((dtype)->elsize = 0)
+/*
+ * PyDataType_* FLAGS, FLACHK, REFCHK, HASFIELDS, HASSUBARRAY, UNSIZED,
+ * SUBARRAY, NAMES, FIELDS, C_METADATA, and METADATA require version specific
+ * lookup and are defined in npy_2_compat.h.
+ */
+
// #define PyArray_ISBOOL(obj) PyTypeNum_ISBOOL(PyArray_TYPE(obj))
// #define PyArray_ISUNSIGNED(obj) PyTypeNum_ISUNSIGNED(PyArray_TYPE(obj))
@@ -3147,7 +3015,6 @@ It also looks like Python itself uses sizeof(char) quite a
// #define PyArray_ISNUMBER(obj) PyTypeNum_ISNUMBER(PyArray_TYPE(obj))
// #define PyArray_ISSTRING(obj) PyTypeNum_ISSTRING(PyArray_TYPE(obj))
// #define PyArray_ISCOMPLEX(obj) PyTypeNum_ISCOMPLEX(PyArray_TYPE(obj))
-// #define PyArray_ISPYTHON(obj) PyTypeNum_ISPYTHON(PyArray_TYPE(obj))
// #define PyArray_ISFLEXIBLE(obj) PyTypeNum_ISFLEXIBLE(PyArray_TYPE(obj))
// #define PyArray_ISDATETIME(obj) PyTypeNum_ISDATETIME(PyArray_TYPE(obj))
// #define PyArray_ISUSERDEF(obj) PyTypeNum_ISUSERDEF(PyArray_TYPE(obj))
@@ -3201,9 +3068,17 @@ It also looks like Python itself uses sizeof(char) quite a
// Targeting ../PyArrayInterface.java
-// Targeting ../PyDataMem_EventHookFunc.java
+// Targeting ../npy_packed_static_string.java
+
+
+// Targeting ../npy_static_string.java
+
+
+// Targeting ../npy_string_allocator.java
+// Targeting ../PyArray_StringDTypeObject.java
+
/*
@@ -3258,6 +3133,7 @@ It also looks like Python itself uses sizeof(char) quite a
// #include
// #include "ndarraytypes.h"
+// #include "dtype_api.h"
/* Includes the "function" C-API -- these are all stored in a
list of pointers --- one for each file
@@ -3268,6 +3144,11 @@ They are available as import_array()
// #include "__multiarray_api.h"
+/*
+ * Include any definitions which are defined differently for 1.x and 2.x
+ * (Symbols only available on 2.x are not there, but rather guarded.)
+ */
+// #include "npy_2_compat.h"
/* C-API that requires previous API to be defined */
@@ -3346,11 +3227,6 @@ They are available as import_array()
// #define PyArray_FILLWBYTE(obj, val) memset(PyArray_DATA(obj), val,
// PyArray_NBYTES(obj))
-// #ifndef PYPY_VERSION
-// #define PyArray_REFCOUNT(obj) (((PyObject *)(obj))->ob_refcnt)
-// #define NPY_REFCOUNT PyArray_REFCOUNT
-// #endif
-public static final int NPY_MAX_ELSIZE = (2 * NPY_SIZEOF_LONGDOUBLE);
// #define PyArray_ContiguousFromAny(op, type, min_depth, max_depth)
// PyArray_FromAny(op, PyArray_DescrFromType(type), min_depth,
@@ -3437,12 +3313,6 @@ They are available as import_array()
// #define PyArray_Put(ap, items, values)
// PyArray_PutTo(ap, items, values, NPY_RAISE)
-/* Compatibility with old Numeric stuff -- don't use in new code */
-
-// #define PyArray_FromDimsAndData(nd, d, type, data)
-// PyArray_FromDimsAndDataAndDescr(nd, d, PyArray_DescrFromType(type),
-// data)
-
/*
Check to see if this key in the dictionary is the "title"
@@ -3458,6 +3328,54 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
// #define DEPRECATE(msg) PyErr_WarnEx(PyExc_DeprecationWarning,msg,1)
// #define DEPRECATE_FUTUREWARNING(msg) PyErr_WarnEx(PyExc_FutureWarning,msg,1)
+
+/*
+ * These macros and functions unfortunately require runtime version checks
+ * that are only defined in `npy_2_compat.h`. For that reasons they cannot be
+ * part of `ndarraytypes.h` which tries to be self contained.
+ */
+
+@NoException public static native @Cast("npy_intp") long PyArray_ITEMSIZE(@Const PyArrayObject arr);
+
+// #define PyDataType_HASFIELDS(obj) (PyDataType_ISLEGACY((PyArray_Descr*)(obj)) && PyDataType_NAMES((PyArray_Descr*)(obj)) != NULL)
+// #define PyDataType_HASSUBARRAY(dtype) (PyDataType_ISLEGACY(dtype) && PyDataType_SUBARRAY(dtype) != NULL)
+// #define PyDataType_ISUNSIZED(dtype) ((dtype)->elsize == 0 &&
+// !PyDataType_HASFIELDS(dtype))
+
+// #define PyDataType_FLAGCHK(dtype, flag)
+// ((PyDataType_FLAGS(dtype) & (flag)) == (flag))
+
+// #define PyDataType_REFCHK(dtype)
+// PyDataType_FLAGCHK(dtype, NPY_ITEM_REFCOUNT)
+
+// #define NPY_BEGIN_THREADS_DESCR(dtype)
+// do {if (!(PyDataType_FLAGCHK((dtype), NPY_NEEDS_PYAPI)))
+// NPY_BEGIN_THREADS;} while (0);
+
+// #define NPY_END_THREADS_DESCR(dtype)
+// do {if (!(PyDataType_FLAGCHK((dtype), NPY_NEEDS_PYAPI)))
+// NPY_END_THREADS; } while (0);
+
+// #if !(defined(NPY_INTERNAL_BUILD) && NPY_INTERNAL_BUILD)
+/* The internal copy of this is now defined in `dtypemeta.h` */
+/*
+ * `PyArray_Scalar` is the same as this function but converts will convert
+ * most NumPy types to Python scalars.
+ */
+@NoException public static native PyObject PyArray_GETITEM(@Const PyArrayObject arr, @Cast("const char*") BytePointer itemptr);
+@NoException public static native PyObject PyArray_GETITEM(@Const PyArrayObject arr, String itemptr);
+
+/*
+ * SETITEM should only be used if it is known that the value is a scalar
+ * and of a type understood by the arrays dtype.
+ * Use `PyArray_Pack` if the value may be of a different dtype.
+ */
+@NoException public static native int PyArray_SETITEM(PyArrayObject arr, @Cast("char*") BytePointer itemptr, PyObject v);
+@NoException public static native int PyArray_SETITEM(PyArrayObject arr, @Cast("char*") ByteBuffer itemptr, PyObject v);
+@NoException public static native int PyArray_SETITEM(PyArrayObject arr, @Cast("char*") byte[] itemptr, PyObject v);
+// #endif /* not internal */
+
+
// #ifdef __cplusplus
// #endif
@@ -3465,26 +3383,454 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
// #endif /* NUMPY_CORE_INCLUDE_NUMPY_NDARRAYOBJECT_H_ */
+// Parsed from dtype_api.h
+
+/*
+ * The public DType API
+ */
+
+// #ifndef NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_
+// #define NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_
+// Targeting ../PyArrayMethodObject_tag.java
+
+
+// Targeting ../PyArray_DTypeMeta.java
+
+
+
+// #else
+
+// #endif /* Py_LIMITED_API */
+
+// #endif /* not internal build */
+
+/*
+ * ******************************************************
+ * ArrayMethod API (Casting and UFuncs)
+ * ******************************************************
+ */
+
+
+/** enum NPY_ARRAYMETHOD_FLAGS */
+public static final int
+ /* Flag for whether the GIL is required */
+ NPY_METH_REQUIRES_PYAPI = 1 << 0,
+ /*
+ * Some functions cannot set floating point error flags, this flag
+ * gives us the option (not requirement) to skip floating point error
+ * setup/check. No function should set error flags and ignore them
+ * since it would interfere with chaining operations (e.g. casting).
+ */
+ NPY_METH_NO_FLOATINGPOINT_ERRORS = 1 << 1,
+ /* Whether the method supports unaligned access (not runtime) */
+ NPY_METH_SUPPORTS_UNALIGNED = 1 << 2,
+ /*
+ * Used for reductions to allow reordering the operation. At this point
+ * assume that if set, it also applies to normal operations though!
+ */
+ NPY_METH_IS_REORDERABLE = 1 << 3,
+ /*
+ * Private flag for now for *logic* functions. The logical functions
+ * `logical_or` and `logical_and` can always cast the inputs to booleans
+ * "safely" (because that is how the cast to bool is defined).
+ * @seberg: I am not sure this is the best way to handle this, so its
+ * private for now (also it is very limited anyway).
+ * There is one "exception". NA aware dtypes cannot cast to bool
+ * (hopefully), so the `??->?` loop should error even with this flag.
+ * But a second NA fallback loop will be necessary.
+ */
+ _NPY_METH_FORCE_CAST_INPUTS = 1 << 17,
+
+ /* All flags which can change at runtime */
+ NPY_METH_RUNTIME_FLAGS = (
+ NPY_METH_REQUIRES_PYAPI |
+ NPY_METH_NO_FLOATINGPOINT_ERRORS);
+// Targeting ../PyArrayMethod_Context.java
+
+
+// Targeting ../PyArrayMethod_Spec.java
+
+
+
+
+/*
+ * ArrayMethod slots
+ * -----------------
+ *
+ * SLOTS IDs For the ArrayMethod creation, once fully public, IDs are fixed
+ * but can be deprecated and arbitrarily extended.
+ */
+public static final int _NPY_METH_resolve_descriptors_with_scalars = 1;
+public static final int NPY_METH_resolve_descriptors = 2;
+public static final int NPY_METH_get_loop = 3;
+public static final int NPY_METH_get_reduction_initial = 4;
+/* specific loops for constructions/default get_loop: */
+public static final int NPY_METH_strided_loop = 5;
+public static final int NPY_METH_contiguous_loop = 6;
+public static final int NPY_METH_unaligned_strided_loop = 7;
+public static final int NPY_METH_unaligned_contiguous_loop = 8;
+public static final int NPY_METH_contiguous_indexed_loop = 9;
+public static final int _NPY_METH_static_data = 10;
+// Targeting ../PyArrayMethod_ResolveDescriptors.java
+
+
+// Targeting ../PyArrayMethod_ResolveDescriptorsWithScalar.java
+
+
+// Targeting ../PyArrayMethod_StridedLoop.java
+
+
+// Targeting ../PyArrayMethod_GetLoop.java
+
+
+// Targeting ../PyArrayMethod_GetReductionInitial.java
+
+
+// Targeting ../PyArrayMethod_TranslateGivenDescriptors.java
+
+
+// Targeting ../PyArrayMethod_TranslateLoopDescriptors.java
+
+
+// Targeting ../PyArrayMethod_TraverseLoop.java
+
+
+// Targeting ../PyArrayMethod_GetTraverseLoop.java
+
+
+// Targeting ../PyArrayMethod_PromoterFunction.java
+
+
+
+/*
+ * ****************************
+ * DTYPE API
+ * ****************************
+ */
+
+public static final int NPY_DT_ABSTRACT = 1 << 1;
+public static final int NPY_DT_PARAMETRIC = 1 << 2;
+public static final int NPY_DT_NUMERIC = 1 << 3;
+
+/*
+ * These correspond to slots in the NPY_DType_Slots struct and must
+ * be in the same order as the members of that struct. If new slots
+ * get added or old slots get removed NPY_NUM_DTYPE_SLOTS must also
+ * be updated
+ */
+
+public static final int NPY_DT_discover_descr_from_pyobject = 1;
+// this slot is considered private because its API hasn't been decided
+public static final int _NPY_DT_is_known_scalar_type = 2;
+public static final int NPY_DT_default_descr = 3;
+public static final int NPY_DT_common_dtype = 4;
+public static final int NPY_DT_common_instance = 5;
+public static final int NPY_DT_ensure_canonical = 6;
+public static final int NPY_DT_setitem = 7;
+public static final int NPY_DT_getitem = 8;
+public static final int NPY_DT_get_clear_loop = 9;
+public static final int NPY_DT_get_fill_zero_loop = 10;
+public static final int NPY_DT_finalize_descr = 11;
+
+// These PyArray_ArrFunc slots will be deprecated and replaced eventually
+// getitem and setitem can be defined as a performance optimization;
+// by default the user dtypes call `legacy_getitem_using_DType` and
+// `legacy_setitem_using_DType`, respectively. This functionality is
+// only supported for basic NumPy DTypes.
+
+
+// used to separate dtype slots from arrfuncs slots
+// intended only for internal use but defined here for clarity
+public static final int _NPY_DT_ARRFUNCS_OFFSET = (1 << 10);
+
+// Cast is disabled
+// #define NPY_DT_PyArray_ArrFuncs_cast 0 + _NPY_DT_ARRFUNCS_OFFSET
+
+public static final int NPY_DT_PyArray_ArrFuncs_getitem = 1 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_setitem = 2 + _NPY_DT_ARRFUNCS_OFFSET;
+
+// Copyswap is disabled
+// #define NPY_DT_PyArray_ArrFuncs_copyswapn 3 + _NPY_DT_ARRFUNCS_OFFSET
+// #define NPY_DT_PyArray_ArrFuncs_copyswap 4 + _NPY_DT_ARRFUNCS_OFFSET
+public static final int NPY_DT_PyArray_ArrFuncs_compare = 5 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_argmax = 6 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_dotfunc = 7 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_scanfunc = 8 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_fromstr = 9 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_nonzero = 10 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_fill = 11 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_fillwithscalar = 12 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_sort = 13 + _NPY_DT_ARRFUNCS_OFFSET;
+public static final int NPY_DT_PyArray_ArrFuncs_argsort = 14 + _NPY_DT_ARRFUNCS_OFFSET;
+
+// Casting related slots are disabled. See
+// https://github.com/numpy/numpy/pull/23173#discussion_r1101098163
+// #define NPY_DT_PyArray_ArrFuncs_castdict 15 + _NPY_DT_ARRFUNCS_OFFSET
+// #define NPY_DT_PyArray_ArrFuncs_scalarkind 16 + _NPY_DT_ARRFUNCS_OFFSET
+// #define NPY_DT_PyArray_ArrFuncs_cancastscalarkindto 17 + _NPY_DT_ARRFUNCS_OFFSET
+// #define NPY_DT_PyArray_ArrFuncs_cancastto 18 + _NPY_DT_ARRFUNCS_OFFSET
+
+// These are deprecated in NumPy 1.19, so are disabled here.
+// #define NPY_DT_PyArray_ArrFuncs_fastclip 19 + _NPY_DT_ARRFUNCS_OFFSET
+// #define NPY_DT_PyArray_ArrFuncs_fastputmask 20 + _NPY_DT_ARRFUNCS_OFFSET
+// #define NPY_DT_PyArray_ArrFuncs_fasttake 21 + _NPY_DT_ARRFUNCS_OFFSET
+public static final int NPY_DT_PyArray_ArrFuncs_argmin = 22 + _NPY_DT_ARRFUNCS_OFFSET;
+// Targeting ../PyArrayDTypeMeta_Spec.java
+
+
+// Targeting ../PyArrayDTypeMeta_DiscoverDescrFromPyobject.java
+
+
+// Targeting ../PyArrayDTypeMeta_IsKnownScalarType.java
+
+
+// Targeting ../PyArrayDTypeMeta_DefaultDescriptor.java
+
+
+// Targeting ../PyArrayDTypeMeta_CommonDType.java
+
+
+
+
+/*
+ * Convenience utility for getting a reference to the DType metaclass associated
+ * with a dtype instance.
+ */
+// #define NPY_DTYPE(descr) ((PyArray_DTypeMeta *)Py_TYPE(descr))
+
+@NoException public static native PyArray_DTypeMeta NPY_DT_NewRef(PyArray_DTypeMeta o);
+// Targeting ../PyArrayDTypeMeta_CommonInstance.java
+
+
+// Targeting ../PyArrayDTypeMeta_EnsureCanonical.java
+
+
+// Targeting ../PyArrayDTypeMeta_FinalizeDescriptor.java
+
+
+// Targeting ../PyArrayDTypeMeta_SetItem.java
+
+
+// Targeting ../PyArrayDTypeMeta_GetItem.java
+
+
+
+// #endif /* NUMPY_CORE_INCLUDE_NUMPY___DTYPE_API_H_ */
+
+
+// Parsed from npy_2_compat.h
+
+/*
+ * This header file defines relevant features which:
+ * - Require runtime inspection depending on the NumPy version.
+ * - May be needed when compiling with an older version of NumPy to allow
+ * a smooth transition.
+ *
+ * As such, it is shipped with NumPy 2.0, but designed to be vendored in full
+ * or parts by downstream projects.
+ *
+ * It must be included after any other includes. `import_array()` must have
+ * been called in the scope or version dependency will misbehave, even when
+ * only `PyUFunc_` API is used.
+ *
+ * If required complicated defs (with inline functions) should be written as:
+ *
+ * #if NPY_FEATURE_VERSION >= NPY_2_0_API_VERSION
+ * Simple definition when NumPy 2.0 API is guaranteed.
+ * #else
+ * static inline definition of a 1.x compatibility shim
+ * #if NPY_ABI_VERSION < 0x02000000
+ * Make 1.x compatibility shim the public API (1.x only branch)
+ * #else
+ * Runtime dispatched version (1.x or 2.x)
+ * #endif
+ * #endif
+ *
+ * An internal build always passes NPY_FEATURE_VERSION >= NPY_2_0_API_VERSION
+ */
+
+// #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_2_COMPAT_H_
+// #define NUMPY_CORE_INCLUDE_NUMPY_NPY_2_COMPAT_H_
+
+/*
+ * New macros for accessing real and complex part of a complex number can be
+ * found in "npy_2_complexcompat.h".
+ */
+
+
+/*
+ * This header is meant to be included by downstream directly for 1.x compat.
+ * In that case we need to ensure that users first included the full headers
+ * and not just `ndarraytypes.h`.
+ */
+
+// #ifndef NPY_FEATURE_VERSION
+// #error "The NumPy 2 compat header requires `import_array()` for which "
+// "the `ndarraytypes.h` header include is not sufficient. Please "
+// "include it after `numpy/ndarrayobject.h` or similar.\n"
+// "To simplify inclusion, you may use `PyArray_ImportNumPy()` "
+// "which is defined in the compat header and is lightweight (can be)."
+// #endif
+
+// #if NPY_ABI_VERSION < 0x02000000
+// #endif
+
+
+/*
+ * Define a better way to call `_import_array()` to simplify backporting as
+ * we now require imports more often (necessary to make ABI flexible).
+ */
+// #ifdef import_array1
+
+@NoException public static native int PyArray_ImportNumPyAPI();
+
+// #endif /* import_array1 */
+
+
+/*
+ * NPY_DEFAULT_INT
+ *
+ * The default integer has changed, `NPY_DEFAULT_INT` is available at runtime
+ * for use as type number, e.g. `PyArray_DescrFromType(NPY_DEFAULT_INT)`.
+ *
+ * NPY_RAVEL_AXIS
+ *
+ * This was introduced in NumPy 2.0 to allow indicating that an axis should be
+ * raveled in an operation. Before NumPy 2.0, NPY_MAXDIMS was used for this purpose.
+ *
+ * NPY_MAXDIMS
+ *
+ * A constant indicating the maximum number dimensions allowed when creating
+ * an ndarray.
+ *
+ * NPY_NTYPES_LEGACY
+ *
+ * The number of built-in NumPy dtypes.
+ */
+// #if NPY_FEATURE_VERSION >= NPY_2_0_API_VERSION
+ public static native @MemberGetter long NPY_DEFAULT_INT();
+ public static final long NPY_DEFAULT_INT = NPY_DEFAULT_INT();
+ public static native @MemberGetter long NPY_RAVEL_AXIS();
+ public static final long NPY_RAVEL_AXIS = NPY_RAVEL_AXIS();
+ public static final int NPY_MAXARGS = 64;
+
+// #elif NPY_ABI_VERSION < 0x02000000
+// #else
+// #endif
+
+
+/*
+ * Access inline functions for descriptor fields. Except for the first
+ * few fields, these needed to be moved (elsize, alignment) for
+ * additional space. Or they are descriptor specific and are not generally
+ * available anymore (metadata, c_metadata, subarray, names, fields).
+ *
+ * Most of these are defined via the `DESCR_ACCESSOR` macro helper.
+ */
+// #if NPY_FEATURE_VERSION >= NPY_2_0_API_VERSION || NPY_ABI_VERSION < 0x02000000
+ /* Compiling for 1.x or 2.x only, direct field access is OK: */
+
+ @NoException public static native void PyDataType_SET_ELSIZE(PyArray_Descr dtype, @Cast("npy_intp") long size);
+
+ @NoException public static native @Cast("npy_uint64") long PyDataType_FLAGS(@Const PyArray_Descr dtype);
+
+// #define DESCR_ACCESSOR(FIELD, field, type, legacy_only)
+// static inline type
+// PyDataType_##FIELD(const PyArray_Descr *dtype) {
+// if (legacy_only && !PyDataType_ISLEGACY(dtype)) {
+// return (type)0;
+// }
+// return ((_PyArray_LegacyDescr *)dtype)->field;
+// }
+// #else /* compiling for both 1.x and 2.x */
+
+ /* Cast to LegacyDescr always fine but needed when `legacy_only` */
+// #define DESCR_ACCESSOR(FIELD, field, type, legacy_only)
+// static inline type
+// PyDataType_##FIELD(const PyArray_Descr *dtype) {
+// if (legacy_only && !PyDataType_ISLEGACY(dtype)) {
+// return (type)0;
+// }
+// if (PyArray_RUNTIME_VERSION >= NPY_2_0_API_VERSION) {
+// return ((_PyArray_LegacyDescr *)dtype)->field;
+// }
+// else {
+// return ((PyArray_DescrProto *)dtype)->field;
+// }
+// }
+// #endif
+
+@NoException public static native @Cast("npy_intp") long PyDataType_ELSIZE(@Const PyArray_Descr dtype);
+@NoException public static native @Cast("npy_intp") long PyDataType_ALIGNMENT(@Const PyArray_Descr dtype);
+@NoException public static native PyObject PyDataType_METADATA(@Const PyArray_Descr dtype);
+@NoException public static native PyArray_ArrayDescr PyDataType_SUBARRAY(@Const PyArray_Descr dtype);
+@NoException public static native PyObject PyDataType_NAMES(@Const PyArray_Descr dtype);
+@NoException public static native PyObject PyDataType_FIELDS(@Const PyArray_Descr dtype);
+@NoException public static native NpyAuxData PyDataType_C_METADATA(@Const PyArray_Descr dtype);
+
+// #undef DESCR_ACCESSOR
+
+
+// #if !(defined(NPY_INTERNAL_BUILD) && NPY_INTERNAL_BUILD)
+// #if NPY_FEATURE_VERSION >= NPY_2_0_API_VERSION
+ @NoException public static native PyArray_ArrFuncs PyDataType_GetArrFuncs(@Const PyArray_Descr descr);
+// #elif NPY_ABI_VERSION < 0x02000000
+// #else
+// #endif
+
+
+// #endif /* not internal build */
+
+// #endif /* NUMPY_CORE_INCLUDE_NUMPY_NPY_2_COMPAT_H_ */
+
+
+// Parsed from npy_2_complexcompat.h
+
+/* This header is designed to be copy-pasted into downstream packages, since it provides
+ a compatibility layer between the old C struct complex types and the new native C99
+ complex types. The new macros are in numpy/npy_math.h, which is why it is included here. */
+// #ifndef NUMPY_CORE_INCLUDE_NUMPY_NPY_2_COMPLEXCOMPAT_H_
+// #define NUMPY_CORE_INCLUDE_NUMPY_NPY_2_COMPLEXCOMPAT_H_
+
+// #include
+
+// #ifndef NPY_CSETREALF
+// #define NPY_CSETREALF(c, r) (c)->real = (r)
+// #endif
+// #ifndef NPY_CSETIMAGF
+// #define NPY_CSETIMAGF(c, i) (c)->imag = (i)
+// #endif
+// #ifndef NPY_CSETREAL
+// #define NPY_CSETREAL(c, r) (c)->real = (r)
+// #endif
+// #ifndef NPY_CSETIMAG
+// #define NPY_CSETIMAG(c, i) (c)->imag = (i)
+// #endif
+// #ifndef NPY_CSETREALL
+// #define NPY_CSETREALL(c, r) (c)->real = (r)
+// #endif
+// #ifndef NPY_CSETIMAGL
+// #define NPY_CSETIMAGL(c, i) (c)->imag = (i)
+// #endif
+
+// #endif
+
+
// Parsed from __multiarray_api.h
// #if defined(_MULTIARRAYMODULE) || defined(WITH_CPYCHECKER_STEALS_REFERENCE_TO_ARG_ATTRIBUTE)
-
public static native @ByRef PyBoolScalarObject _PyArrayScalar_BoolValues(int i); public static native void _PyArrayScalar_BoolValues(int i, PyBoolScalarObject setter);
@MemberGetter public static native PyBoolScalarObject _PyArrayScalar_BoolValues();
@NoException public static native @Cast("unsigned int") int PyArray_GetNDArrayCVersion();
-public static native @ByRef PyTypeObject PyBigArray_Type(); public static native void PyBigArray_Type(PyTypeObject setter);
-
public static native @ByRef PyTypeObject PyArray_Type(); public static native void PyArray_Type(PyTypeObject setter);
public static native @ByRef PyTypeObject PyArrayDescr_Type(); public static native void PyArrayDescr_Type(PyTypeObject setter);
// #define PyArrayDescr_Type (*(PyTypeObject *)(&PyArrayDescr_TypeFull))
-public static native @ByRef PyTypeObject PyArrayFlags_Type(); public static native void PyArrayFlags_Type(PyTypeObject setter);
-
public static native @ByRef PyTypeObject PyArrayIter_Type(); public static native void PyArrayIter_Type(PyTypeObject setter);
public static native @ByRef PyTypeObject PyArrayMultiIter_Type(); public static native void PyArrayMultiIter_Type(PyTypeObject setter);
@@ -3553,8 +3899,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
public static native @ByRef PyTypeObject PyVoidArrType_Type(); public static native void PyVoidArrType_Type(PyTypeObject setter);
-@NoException public static native int PyArray_SetNumericOps(PyObject arg0);
-@NoException public static native PyObject PyArray_GetNumericOps();
@NoException public static native int PyArray_INCREF(PyArrayObject arg0);
@NoException public static native int PyArray_XDECREF(PyArrayObject arg0);
@NoException public static native void PyArray_SetStringFunction(PyObject arg0, int arg1);
@@ -3563,8 +3907,8 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native @Cast("char*") BytePointer PyArray_Zero(PyArrayObject arg0);
@NoException public static native @Cast("char*") BytePointer PyArray_One(PyArrayObject arg0);
@NoException public static native PyObject PyArray_CastToType(PyArrayObject arg0, PyArray_Descr arg1, int arg2);
-@NoException public static native int PyArray_CastTo(PyArrayObject arg0, PyArrayObject arg1);
-@NoException public static native int PyArray_CastAnyTo(PyArrayObject arg0, PyArrayObject arg1);
+@NoException public static native int PyArray_CopyInto(PyArrayObject arg0, PyArrayObject arg1);
+@NoException public static native int PyArray_CopyAnyInto(PyArrayObject arg0, PyArrayObject arg1);
@NoException public static native int PyArray_CanCastSafely(int arg0, int arg1);
@NoException public static native @Cast("npy_bool") byte PyArray_CanCastTo(PyArray_Descr arg0, PyArray_Descr arg1);
@NoException public static native int PyArray_ObjectType(PyObject arg0, int arg1);
@@ -3580,14 +3924,7 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native void PyArray_ScalarAsCtype(PyObject arg0, Pointer arg1);
@NoException public static native int PyArray_CastScalarToCtype(PyObject arg0, Pointer arg1, PyArray_Descr arg2);
@NoException public static native int PyArray_CastScalarDirect(PyObject arg0, PyArray_Descr arg1, Pointer arg2, int arg3);
-@NoException public static native PyObject PyArray_ScalarFromObject(PyObject arg0);
-@NoException public static native PyArray_VectorUnaryFunc PyArray_GetCastFunc(PyArray_Descr arg0, int arg1);
-@NoException public static native PyObject PyArray_FromDims(int __NPY_UNUSED_TAGGEDnd, IntPointer __NPY_UNUSED_TAGGEDd, int __NPY_UNUSED_TAGGEDtype );
-@NoException public static native PyObject PyArray_FromDims(int __NPY_UNUSED_TAGGEDnd, IntBuffer __NPY_UNUSED_TAGGEDd, int __NPY_UNUSED_TAGGEDtype );
-@NoException public static native PyObject PyArray_FromDims(int __NPY_UNUSED_TAGGEDnd, int[] __NPY_UNUSED_TAGGEDd, int __NPY_UNUSED_TAGGEDtype );
-@NoException public static native PyObject PyArray_FromDimsAndDataAndDescr(int __NPY_UNUSED_TAGGEDnd, IntPointer __NPY_UNUSED_TAGGEDd, PyArray_Descr arg2, @Cast("char*") BytePointer __NPY_UNUSED_TAGGEDdata );
-@NoException public static native PyObject PyArray_FromDimsAndDataAndDescr(int __NPY_UNUSED_TAGGEDnd, IntBuffer __NPY_UNUSED_TAGGEDd, PyArray_Descr arg2, @Cast("char*") ByteBuffer __NPY_UNUSED_TAGGEDdata );
-@NoException public static native PyObject PyArray_FromDimsAndDataAndDescr(int __NPY_UNUSED_TAGGEDnd, int[] __NPY_UNUSED_TAGGEDd, PyArray_Descr arg2, @Cast("char*") byte[] __NPY_UNUSED_TAGGEDdata );
+@NoException public static native int PyArray_Pack(PyArray_Descr arg0, Pointer arg1, PyObject arg2);
@NoException public static native PyObject PyArray_FromAny(PyObject arg0, PyArray_Descr arg1, int arg2, int arg3, int arg4, PyObject arg5);
@NoException public static native PyObject PyArray_EnsureArray(PyObject arg0);
@NoException public static native PyObject PyArray_EnsureAnyArray(PyObject arg0);
@@ -3604,9 +3941,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native int PyArray_SetField(PyArrayObject arg0, PyArray_Descr arg1, int arg2, PyObject arg3);
@NoException public static native PyObject PyArray_Byteswap(PyArrayObject arg0, @Cast("npy_bool") byte arg1);
@NoException public static native PyObject PyArray_Resize(PyArrayObject arg0, PyArray_Dims arg1, int arg2, @Cast("NPY_ORDER") int __NPY_UNUSED_TAGGEDorder );
-@NoException public static native int PyArray_MoveInto(PyArrayObject arg0, PyArrayObject arg1);
-@NoException public static native int PyArray_CopyInto(PyArrayObject arg0, PyArrayObject arg1);
-@NoException public static native int PyArray_CopyAnyInto(PyArrayObject arg0, PyArrayObject arg1);
@NoException public static native int PyArray_CopyObject(PyArrayObject arg0, PyObject arg1);
@NoException public static native PyObject PyArray_NewCopy(PyArrayObject arg0, @Cast("NPY_ORDER") int arg1);
@NoException public static native PyObject PyArray_ToList(PyArrayObject arg0);
@@ -3628,7 +3962,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native int PyArray_PyIntAsInt(PyObject arg0);
@NoException public static native @Cast("npy_intp") long PyArray_PyIntAsIntp(PyObject arg0);
@NoException public static native int PyArray_Broadcast(PyArrayMultiIterObject arg0);
-@NoException public static native void PyArray_FillObjectArray(PyArrayObject arg0, PyObject arg1);
@NoException public static native int PyArray_FillWithScalar(PyArrayObject arg0, PyObject arg1);
@NoException public static native @Cast("npy_bool") byte PyArray_CheckStrides(int arg0, int arg1, @Cast("npy_intp") long arg2, @Cast("npy_intp") long arg3, @Cast("const npy_intp*") SizeTPointer arg4, @Cast("const npy_intp*") SizeTPointer arg5);
@NoException public static native PyArray_Descr PyArray_DescrNewByteorder(PyArray_Descr arg0, @Cast("char") byte arg1);
@@ -3643,11 +3976,7 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native @Cast("NPY_SCALARKIND") int PyArray_ScalarKind(int arg0, @Cast("PyArrayObject**") PointerPointer arg1);
@NoException public static native @Cast("NPY_SCALARKIND") int PyArray_ScalarKind(int arg0, @ByPtrPtr PyArrayObject arg1);
@NoException public static native int PyArray_CanCoerceScalar(int arg0, int arg1, @Cast("NPY_SCALARKIND") int arg2);
-@NoException public static native PyObject PyArray_NewFlagsObject(PyObject arg0);
@NoException public static native @Cast("npy_bool") byte PyArray_CanCastScalar(PyTypeObject arg0, PyTypeObject arg1);
-@NoException public static native int PyArray_CompareUCS4(@Cast("const npy_ucs4*") IntPointer arg0, @Cast("const npy_ucs4*") IntPointer arg1, @Cast("size_t") long arg2);
-@NoException public static native int PyArray_CompareUCS4(@Cast("const npy_ucs4*") IntBuffer arg0, @Cast("const npy_ucs4*") IntBuffer arg1, @Cast("size_t") long arg2);
-@NoException public static native int PyArray_CompareUCS4(@Cast("const npy_ucs4*") int[] arg0, @Cast("const npy_ucs4*") int[] arg1, @Cast("size_t") long arg2);
@NoException public static native int PyArray_RemoveSmallest(PyArrayMultiIterObject arg0);
@NoException public static native int PyArray_ElementStrides(PyObject arg0);
@NoException public static native void PyArray_Item_INCREF(@Cast("char*") BytePointer arg0, PyArray_Descr arg1);
@@ -3656,7 +3985,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native void PyArray_Item_XDECREF(@Cast("char*") BytePointer arg0, PyArray_Descr arg1);
@NoException public static native void PyArray_Item_XDECREF(@Cast("char*") ByteBuffer arg0, PyArray_Descr arg1);
@NoException public static native void PyArray_Item_XDECREF(@Cast("char*") byte[] arg0, PyArray_Descr arg1);
-@NoException public static native PyObject PyArray_FieldNames(PyObject arg0);
@NoException public static native PyObject PyArray_Transpose(PyArrayObject arg0, PyArray_Dims arg1);
@NoException public static native PyObject PyArray_TakeFrom(PyArrayObject arg0, PyObject arg1, int arg2, PyArrayObject arg3, @Cast("NPY_CLIPMODE") int arg4);
@NoException public static native PyObject PyArray_PutTo(PyArrayObject arg0, PyObject arg1, PyObject arg2, @Cast("NPY_CLIPMODE") int arg3);
@@ -3700,14 +4028,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native int PyArray_CompareLists(@Cast("const npy_intp*") SizeTPointer arg0, @Cast("const npy_intp*") SizeTPointer arg1, int arg2);
@NoException public static native int PyArray_AsCArray(@Cast("PyObject**") PointerPointer arg0, Pointer arg1, @Cast("npy_intp*") SizeTPointer arg2, int arg3, PyArray_Descr arg4);
@NoException public static native int PyArray_AsCArray(@ByPtrPtr PyObject arg0, Pointer arg1, @Cast("npy_intp*") SizeTPointer arg2, int arg3, PyArray_Descr arg4);
-@NoException public static native int PyArray_As1D(@Cast("PyObject**") PointerPointer __NPY_UNUSED_TAGGEDop, @Cast("char**") PointerPointer __NPY_UNUSED_TAGGEDptr, IntPointer __NPY_UNUSED_TAGGEDd1, int __NPY_UNUSED_TAGGEDtypecode );
-@NoException public static native int PyArray_As1D(@ByPtrPtr PyObject __NPY_UNUSED_TAGGEDop, @Cast("char**") @ByPtrPtr BytePointer __NPY_UNUSED_TAGGEDptr, IntPointer __NPY_UNUSED_TAGGEDd1, int __NPY_UNUSED_TAGGEDtypecode );
-@NoException public static native int PyArray_As1D(@ByPtrPtr PyObject __NPY_UNUSED_TAGGEDop, @Cast("char**") @ByPtrPtr ByteBuffer __NPY_UNUSED_TAGGEDptr, IntBuffer __NPY_UNUSED_TAGGEDd1, int __NPY_UNUSED_TAGGEDtypecode );
-@NoException public static native int PyArray_As1D(@ByPtrPtr PyObject __NPY_UNUSED_TAGGEDop, @Cast("char**") @ByPtrPtr byte[] __NPY_UNUSED_TAGGEDptr, int[] __NPY_UNUSED_TAGGEDd1, int __NPY_UNUSED_TAGGEDtypecode );
-@NoException public static native int PyArray_As2D(@Cast("PyObject**") PointerPointer __NPY_UNUSED_TAGGEDop, @Cast("char***") @ByPtrPtr PointerPointer __NPY_UNUSED_TAGGEDptr, IntPointer __NPY_UNUSED_TAGGEDd1, IntPointer __NPY_UNUSED_TAGGEDd2, int __NPY_UNUSED_TAGGEDtypecode );
-@NoException public static native int PyArray_As2D(@ByPtrPtr PyObject __NPY_UNUSED_TAGGEDop, @Cast("char***") @ByPtrPtr PointerPointer __NPY_UNUSED_TAGGEDptr, IntPointer __NPY_UNUSED_TAGGEDd1, IntPointer __NPY_UNUSED_TAGGEDd2, int __NPY_UNUSED_TAGGEDtypecode );
-@NoException public static native int PyArray_As2D(@ByPtrPtr PyObject __NPY_UNUSED_TAGGEDop, @Cast("char***") @ByPtrPtr PointerPointer __NPY_UNUSED_TAGGEDptr, IntBuffer __NPY_UNUSED_TAGGEDd1, IntBuffer __NPY_UNUSED_TAGGEDd2, int __NPY_UNUSED_TAGGEDtypecode );
-@NoException public static native int PyArray_As2D(@ByPtrPtr PyObject __NPY_UNUSED_TAGGEDop, @Cast("char***") @ByPtrPtr PointerPointer __NPY_UNUSED_TAGGEDptr, int[] __NPY_UNUSED_TAGGEDd1, int[] __NPY_UNUSED_TAGGEDd2, int __NPY_UNUSED_TAGGEDtypecode );
@NoException public static native int PyArray_Free(PyObject arg0, Pointer arg1);
@NoException public static native int PyArray_Converter(PyObject arg0, @Cast("PyObject**") PointerPointer arg1);
@NoException public static native int PyArray_Converter(PyObject arg0, @ByPtrPtr PyObject arg1);
@@ -3715,9 +4035,7 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native PyObject PyArray_Concatenate(PyObject arg0, int arg1);
@NoException public static native PyObject PyArray_InnerProduct(PyObject arg0, PyObject arg1);
@NoException public static native PyObject PyArray_MatrixProduct(PyObject arg0, PyObject arg1);
-@NoException public static native PyObject PyArray_CopyAndTranspose(PyObject arg0);
@NoException public static native PyObject PyArray_Correlate(PyObject arg0, PyObject arg1, int arg2);
-@NoException public static native int PyArray_TypestrConvert(int arg0, int arg1);
@NoException public static native int PyArray_DescrConverter(PyObject arg0, @Cast("PyArray_Descr**") PointerPointer arg1);
@NoException public static native int PyArray_DescrConverter(PyObject arg0, @ByPtrPtr PyArray_Descr arg1);
@NoException public static native int PyArray_DescrConverter2(PyObject arg0, @Cast("PyArray_Descr**") PointerPointer arg1);
@@ -3748,21 +4066,17 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native PyObject PyArray_LexSort(PyObject arg0, int arg1);
@NoException public static native PyObject PyArray_Round(PyArrayObject arg0, int arg1, PyArrayObject arg2);
@NoException public static native @Cast("unsigned char") byte PyArray_EquivTypenums(int arg0, int arg1);
-@NoException public static native int PyArray_RegisterDataType(PyArray_Descr arg0);
+@NoException public static native int PyArray_RegisterDataType(PyArray_DescrProto arg0);
@NoException public static native int PyArray_RegisterCastFunc(PyArray_Descr arg0, int arg1, PyArray_VectorUnaryFunc arg2);
@NoException public static native int PyArray_RegisterCanCast(PyArray_Descr arg0, int arg1, @Cast("NPY_SCALARKIND") int arg2);
@NoException public static native void PyArray_InitArrFuncs(PyArray_ArrFuncs arg0);
@NoException public static native PyObject PyArray_IntTupleFromIntp(int arg0, @Cast("const npy_intp*") SizeTPointer arg1);
-@NoException public static native int PyArray_TypeNumFromName(@Cast("const char*") BytePointer arg0);
-@NoException public static native int PyArray_TypeNumFromName(String arg0);
@NoException public static native int PyArray_ClipmodeConverter(PyObject arg0, @Cast("NPY_CLIPMODE*") IntPointer arg1);
@NoException public static native int PyArray_ClipmodeConverter(PyObject arg0, @Cast("NPY_CLIPMODE*") IntBuffer arg1);
@NoException public static native int PyArray_ClipmodeConverter(PyObject arg0, @Cast("NPY_CLIPMODE*") int[] arg1);
@NoException public static native int PyArray_OutputConverter(PyObject arg0, @Cast("PyArrayObject**") PointerPointer arg1);
@NoException public static native int PyArray_OutputConverter(PyObject arg0, @ByPtrPtr PyArrayObject arg1);
@NoException public static native PyObject PyArray_BroadcastToShape(PyObject arg0, @Cast("npy_intp*") SizeTPointer arg1, int arg2);
-@NoException public static native void _PyArray_SigintHandler(int arg0);
-@NoException public static native Pointer _PyArray_GetSigintBuf();
@NoException public static native int PyArray_DescrAlignConverter(PyObject arg0, @Cast("PyArray_Descr**") PointerPointer arg1);
@NoException public static native int PyArray_DescrAlignConverter(PyObject arg0, @ByPtrPtr PyArray_Descr arg1);
@NoException public static native int PyArray_DescrAlignConverter2(PyObject arg0, @Cast("PyArray_Descr**") PointerPointer arg1);
@@ -3772,8 +4086,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native PyObject PyArray_CheckAxis(PyArrayObject arg0, IntBuffer arg1, int arg2);
@NoException public static native PyObject PyArray_CheckAxis(PyArrayObject arg0, int[] arg1, int arg2);
@NoException public static native @Cast("npy_intp") long PyArray_OverflowMultiplyList(@Cast("const npy_intp*") SizeTPointer arg0, int arg1);
-@NoException public static native int PyArray_CompareString(@Cast("const char*") BytePointer arg0, @Cast("const char*") BytePointer arg1, @Cast("size_t") long arg2);
-@NoException public static native int PyArray_CompareString(String arg0, String arg1, @Cast("size_t") long arg2);
@NoException public static native PyObject PyArray_MultiIterFromObjects(@Cast("PyObject**") PointerPointer arg0, int arg1, int arg2);
@NoException public static native PyObject PyArray_MultiIterFromObjects(@ByPtrPtr PyObject arg0, int arg1, int arg2);
@NoException public static native int PyArray_GetEndianness();
@@ -3790,11 +4102,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
public static native @ByRef PyTypeObject NpyIter_Type(); public static native void NpyIter_Type(PyTypeObject setter);
-@NoException public static native void PyArray_SetDatetimeParseFunction(PyObject __NPY_UNUSED_TAGGEDop );
-@NoException public static native void PyArray_DatetimeToDatetimeStruct(@Cast("npy_datetime") long __NPY_UNUSED_TAGGEDval, @Cast("NPY_DATETIMEUNIT") int __NPY_UNUSED_TAGGEDfr, npy_datetimestruct arg2);
-@NoException public static native void PyArray_TimedeltaToTimedeltaStruct(@Cast("npy_timedelta") long __NPY_UNUSED_TAGGEDval, @Cast("NPY_DATETIMEUNIT") int __NPY_UNUSED_TAGGEDfr, npy_timedeltastruct arg2);
-@NoException public static native @Cast("npy_datetime") long PyArray_DatetimeStructToDatetime(@Cast("NPY_DATETIMEUNIT") int __NPY_UNUSED_TAGGEDfr, npy_datetimestruct __NPY_UNUSED_TAGGEDd );
-@NoException public static native @Cast("npy_datetime") long PyArray_TimedeltaStructToTimedelta(@Cast("NPY_DATETIMEUNIT") int __NPY_UNUSED_TAGGEDfr, npy_timedeltastruct __NPY_UNUSED_TAGGEDd );
@NoException public static native NpyIter NpyIter_New(PyArrayObject arg0, @Cast("npy_uint32") int arg1, @Cast("NPY_ORDER") int arg2, @Cast("NPY_CASTING") int arg3, PyArray_Descr arg4);
@NoException public static native NpyIter NpyIter_MultiNew(int arg0, @Cast("PyArrayObject**") PointerPointer arg1, @Cast("npy_uint32") int arg2, @Cast("NPY_ORDER") int arg3, @Cast("NPY_CASTING") int arg4, @Cast("npy_uint32*") IntPointer arg5, @Cast("PyArray_Descr**") PointerPointer arg6);
@NoException public static native NpyIter NpyIter_MultiNew(int arg0, @ByPtrPtr PyArrayObject arg1, @Cast("npy_uint32") int arg2, @Cast("NPY_ORDER") int arg3, @Cast("NPY_CASTING") int arg4, @Cast("npy_uint32*") IntPointer arg5, @ByPtrPtr PyArray_Descr arg6);
@@ -3880,10 +4187,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native PyArrayObject PyArray_EinsteinSum(@Cast("char*") ByteBuffer arg0, @Cast("npy_intp") long arg1, @ByPtrPtr PyArrayObject arg2, PyArray_Descr arg3, @Cast("NPY_ORDER") int arg4, @Cast("NPY_CASTING") int arg5, PyArrayObject arg6);
@NoException public static native PyArrayObject PyArray_EinsteinSum(@Cast("char*") byte[] arg0, @Cast("npy_intp") long arg1, @ByPtrPtr PyArrayObject arg2, PyArray_Descr arg3, @Cast("NPY_ORDER") int arg4, @Cast("NPY_CASTING") int arg5, PyArrayObject arg6);
@NoException public static native PyObject PyArray_NewLikeArray(PyArrayObject arg0, @Cast("NPY_ORDER") int arg1, PyArray_Descr arg2, int arg3);
-@NoException public static native int PyArray_GetArrayParamsFromObject(PyObject __NPY_UNUSED_TAGGEDop, PyArray_Descr __NPY_UNUSED_TAGGEDrequested_dtype, @Cast("npy_bool") byte __NPY_UNUSED_TAGGEDwriteable, @Cast("PyArray_Descr**") PointerPointer __NPY_UNUSED_TAGGEDout_dtype, IntPointer __NPY_UNUSED_TAGGEDout_ndim, @Cast("npy_intp*") SizeTPointer __NPY_UNUSED_TAGGEDout_dims, @Cast("PyArrayObject**") PointerPointer __NPY_UNUSED_TAGGEDout_arr, PyObject __NPY_UNUSED_TAGGEDcontext );
-@NoException public static native int PyArray_GetArrayParamsFromObject(PyObject __NPY_UNUSED_TAGGEDop, PyArray_Descr __NPY_UNUSED_TAGGEDrequested_dtype, @Cast("npy_bool") byte __NPY_UNUSED_TAGGEDwriteable, @ByPtrPtr PyArray_Descr __NPY_UNUSED_TAGGEDout_dtype, IntPointer __NPY_UNUSED_TAGGEDout_ndim, @Cast("npy_intp*") SizeTPointer __NPY_UNUSED_TAGGEDout_dims, @ByPtrPtr PyArrayObject __NPY_UNUSED_TAGGEDout_arr, PyObject __NPY_UNUSED_TAGGEDcontext );
-@NoException public static native int PyArray_GetArrayParamsFromObject(PyObject __NPY_UNUSED_TAGGEDop, PyArray_Descr __NPY_UNUSED_TAGGEDrequested_dtype, @Cast("npy_bool") byte __NPY_UNUSED_TAGGEDwriteable, @ByPtrPtr PyArray_Descr __NPY_UNUSED_TAGGEDout_dtype, IntBuffer __NPY_UNUSED_TAGGEDout_ndim, @Cast("npy_intp*") SizeTPointer __NPY_UNUSED_TAGGEDout_dims, @ByPtrPtr PyArrayObject __NPY_UNUSED_TAGGEDout_arr, PyObject __NPY_UNUSED_TAGGEDcontext );
-@NoException public static native int PyArray_GetArrayParamsFromObject(PyObject __NPY_UNUSED_TAGGEDop, PyArray_Descr __NPY_UNUSED_TAGGEDrequested_dtype, @Cast("npy_bool") byte __NPY_UNUSED_TAGGEDwriteable, @ByPtrPtr PyArray_Descr __NPY_UNUSED_TAGGEDout_dtype, int[] __NPY_UNUSED_TAGGEDout_ndim, @Cast("npy_intp*") SizeTPointer __NPY_UNUSED_TAGGEDout_dims, @ByPtrPtr PyArrayObject __NPY_UNUSED_TAGGEDout_arr, PyObject __NPY_UNUSED_TAGGEDcontext );
@NoException public static native int PyArray_ConvertClipmodeSequence(PyObject arg0, @Cast("NPY_CLIPMODE*") IntPointer arg1, int arg2);
@NoException public static native int PyArray_ConvertClipmodeSequence(PyObject arg0, @Cast("NPY_CLIPMODE*") IntBuffer arg1, int arg2);
@NoException public static native int PyArray_ConvertClipmodeSequence(PyObject arg0, @Cast("NPY_CLIPMODE*") int[] arg1, int arg2);
@@ -3901,14 +4204,8 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native Pointer PyDataMem_NEW(@Cast("size_t") long arg0);
@NoException public static native void PyDataMem_FREE(Pointer arg0);
@NoException public static native Pointer PyDataMem_RENEW(Pointer arg0, @Cast("size_t") long arg1);
-@NoException public static native PyDataMem_EventHookFunc PyDataMem_SetEventHook(PyDataMem_EventHookFunc arg0, Pointer arg1, @Cast("void**") PointerPointer arg2);
-@NoException public static native PyDataMem_EventHookFunc PyDataMem_SetEventHook(PyDataMem_EventHookFunc arg0, Pointer arg1, @Cast("void**") @ByPtrPtr Pointer arg2);
public static native @Cast("NPY_CASTING") int NPY_DEFAULT_ASSIGN_CASTING(); public static native void NPY_DEFAULT_ASSIGN_CASTING(int setter);
-@NoException public static native void PyArray_MapIterSwapAxes(PyArrayMapIterObject arg0, @Cast("PyArrayObject**") PointerPointer arg1, int arg2);
-@NoException public static native void PyArray_MapIterSwapAxes(PyArrayMapIterObject arg0, @ByPtrPtr PyArrayObject arg1, int arg2);
-@NoException public static native PyObject PyArray_MapIterArray(PyArrayObject arg0, PyObject arg1);
-@NoException public static native void PyArray_MapIterNext(PyArrayMapIterObject arg0);
@NoException public static native int PyArray_Partition(PyArrayObject arg0, PyArrayObject arg1, int arg2, @Cast("NPY_SELECTKIND") int arg3);
@NoException public static native PyObject PyArray_ArgPartition(PyArrayObject arg0, PyArrayObject arg1, int arg2, @Cast("NPY_SELECTKIND") int arg3);
@NoException public static native int PyArray_SelectkindConverter(PyObject arg0, @Cast("NPY_SELECTKIND*") IntPointer arg1);
@@ -3916,13 +4213,43 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native int PyArray_SelectkindConverter(PyObject arg0, @Cast("NPY_SELECTKIND*") int[] arg1);
@NoException public static native Pointer PyDataMem_NEW_ZEROED(@Cast("size_t") long arg0, @Cast("size_t") long arg1);
@NoException public static native int PyArray_CheckAnyScalarExact(PyObject arg0);
-@NoException public static native PyObject PyArray_MapIterArrayCopyIfOverlap(PyArrayObject arg0, PyObject arg1, int arg2, PyArrayObject arg3);
@NoException public static native int PyArray_ResolveWritebackIfCopy(PyArrayObject arg0);
@NoException public static native int PyArray_SetWritebackIfCopyBase(PyArrayObject arg0, PyArrayObject arg1);
public static native PyObject PyDataMem_DefaultHandler(); public static native void PyDataMem_DefaultHandler(PyObject setter);
+@NoException public static native int NpyDatetime_ConvertDatetime64ToDatetimeStruct(PyArray_DatetimeMetaData arg0, @Cast("npy_datetime") long arg1, npy_datetimestruct arg2);
+@NoException public static native int NpyDatetime_ConvertDatetimeStructToDatetime64(PyArray_DatetimeMetaData arg0, @Const npy_datetimestruct arg1, @Cast("npy_datetime*") CLongPointer arg2);
+@NoException public static native int NpyDatetime_ConvertPyDateTimeToDatetimeStruct(PyObject arg0, npy_datetimestruct arg1, @Cast("NPY_DATETIMEUNIT*") IntPointer arg2, int arg3);
+@NoException public static native int NpyDatetime_ConvertPyDateTimeToDatetimeStruct(PyObject arg0, npy_datetimestruct arg1, @Cast("NPY_DATETIMEUNIT*") IntBuffer arg2, int arg3);
+@NoException public static native int NpyDatetime_ConvertPyDateTimeToDatetimeStruct(PyObject arg0, npy_datetimestruct arg1, @Cast("NPY_DATETIMEUNIT*") int[] arg2, int arg3);
+@NoException public static native int NpyDatetime_GetDatetimeISO8601StrLen(int arg0, @Cast("NPY_DATETIMEUNIT") int arg1);
+@NoException public static native int NpyDatetime_MakeISO8601Datetime(npy_datetimestruct arg0, @Cast("char*") BytePointer arg1, @Cast("npy_intp") long arg2, int arg3, int arg4, @Cast("NPY_DATETIMEUNIT") int arg5, int arg6, @Cast("NPY_CASTING") int arg7);
+@NoException public static native int NpyDatetime_MakeISO8601Datetime(npy_datetimestruct arg0, @Cast("char*") ByteBuffer arg1, @Cast("npy_intp") long arg2, int arg3, int arg4, @Cast("NPY_DATETIMEUNIT") int arg5, int arg6, @Cast("NPY_CASTING") int arg7);
+@NoException public static native int NpyDatetime_MakeISO8601Datetime(npy_datetimestruct arg0, @Cast("char*") byte[] arg1, @Cast("npy_intp") long arg2, int arg3, int arg4, @Cast("NPY_DATETIMEUNIT") int arg5, int arg6, @Cast("NPY_CASTING") int arg7);
+@NoException public static native int NpyDatetime_ParseISO8601Datetime(@Cast("const char*") BytePointer arg0, @Cast("Py_ssize_t") long arg1, @Cast("NPY_DATETIMEUNIT") int arg2, @Cast("NPY_CASTING") int arg3, npy_datetimestruct arg4, @Cast("NPY_DATETIMEUNIT*") IntPointer arg5, @Cast("npy_bool*") BytePointer arg6);
+@NoException public static native int NpyDatetime_ParseISO8601Datetime(String arg0, @Cast("Py_ssize_t") long arg1, @Cast("NPY_DATETIMEUNIT") int arg2, @Cast("NPY_CASTING") int arg3, npy_datetimestruct arg4, @Cast("NPY_DATETIMEUNIT*") IntBuffer arg5, @Cast("npy_bool*") ByteBuffer arg6);
+@NoException public static native int NpyDatetime_ParseISO8601Datetime(@Cast("const char*") BytePointer arg0, @Cast("Py_ssize_t") long arg1, @Cast("NPY_DATETIMEUNIT") int arg2, @Cast("NPY_CASTING") int arg3, npy_datetimestruct arg4, @Cast("NPY_DATETIMEUNIT*") int[] arg5, @Cast("npy_bool*") byte[] arg6);
+@NoException public static native int NpyDatetime_ParseISO8601Datetime(String arg0, @Cast("Py_ssize_t") long arg1, @Cast("NPY_DATETIMEUNIT") int arg2, @Cast("NPY_CASTING") int arg3, npy_datetimestruct arg4, @Cast("NPY_DATETIMEUNIT*") IntPointer arg5, @Cast("npy_bool*") BytePointer arg6);
+@NoException public static native int NpyDatetime_ParseISO8601Datetime(@Cast("const char*") BytePointer arg0, @Cast("Py_ssize_t") long arg1, @Cast("NPY_DATETIMEUNIT") int arg2, @Cast("NPY_CASTING") int arg3, npy_datetimestruct arg4, @Cast("NPY_DATETIMEUNIT*") IntBuffer arg5, @Cast("npy_bool*") ByteBuffer arg6);
+@NoException public static native int NpyDatetime_ParseISO8601Datetime(String arg0, @Cast("Py_ssize_t") long arg1, @Cast("NPY_DATETIMEUNIT") int arg2, @Cast("NPY_CASTING") int arg3, npy_datetimestruct arg4, @Cast("NPY_DATETIMEUNIT*") int[] arg5, @Cast("npy_bool*") byte[] arg6);
+@NoException public static native int NpyString_load(npy_string_allocator arg0, @Const npy_packed_static_string arg1, npy_static_string arg2);
+@NoException public static native int NpyString_pack(npy_string_allocator arg0, npy_packed_static_string arg1, @Cast("const char*") BytePointer arg2, @Cast("size_t") long arg3);
+@NoException public static native int NpyString_pack(npy_string_allocator arg0, npy_packed_static_string arg1, String arg2, @Cast("size_t") long arg3);
+@NoException public static native int NpyString_pack_null(npy_string_allocator arg0, npy_packed_static_string arg1);
+@NoException public static native npy_string_allocator NpyString_acquire_allocator(@Const PyArray_StringDTypeObject arg0);
+@NoException public static native void NpyString_acquire_allocators(@Cast("size_t") long arg0, @Cast("PyArray_Descr*const*") PointerPointer descrs, @Cast("npy_string_allocator**") PointerPointer allocators);
+@NoException public static native void NpyString_acquire_allocators(@Cast("size_t") long arg0, @ByPtrPtr PyArray_Descr descrs, @ByPtrPtr npy_string_allocator allocators);
+@NoException public static native void NpyString_release_allocator(npy_string_allocator arg0);
+@NoException public static native void NpyString_release_allocators(@Cast("size_t") long arg0, @Cast("npy_string_allocator**") PointerPointer allocators);
+@NoException public static native void NpyString_release_allocators(@Cast("size_t") long arg0, @ByPtrPtr npy_string_allocator allocators);
+@NoException public static native PyArray_Descr PyArray_GetDefaultDescr(PyArray_DTypeMeta arg0);
+@NoException public static native int PyArrayInitDTypeMeta_FromSpec(PyArray_DTypeMeta arg0, PyArrayDTypeMeta_Spec arg1);
+@NoException public static native PyArray_DTypeMeta PyArray_CommonDType(PyArray_DTypeMeta arg0, PyArray_DTypeMeta arg1);
+@NoException public static native PyArray_DTypeMeta PyArray_PromoteDTypeSequence(@Cast("npy_intp") long arg0, @Cast("PyArray_DTypeMeta**") PointerPointer arg1);
+@NoException public static native PyArray_DTypeMeta PyArray_PromoteDTypeSequence(@Cast("npy_intp") long arg0, @ByPtrPtr PyArray_DTypeMeta arg1);
+@NoException public static native PyArray_ArrFuncs _PyDataType_GetArrFuncs(@Const PyArray_Descr arg0);
// #else
@@ -3932,6 +4259,7 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
// #if defined(NO_IMPORT) || defined(NO_IMPORT_ARRAY)
public static native Pointer PyArray_API(int i); public static native void PyArray_API(int i, Pointer setter);
public static native @Cast("void**") PointerPointer PyArray_API(); public static native void PyArray_API(PointerPointer setter);
+public static native int PyArray_RUNTIME_VERSION(); public static native void PyArray_RUNTIME_VERSION(int setter);
// #else
// #if defined(PY_ARRAY_UNIQUE_SYMBOL)
// #else
@@ -3939,14 +4267,44 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
// #endif
+/*
+ * The DType classes are inconvenient for the Python generation so exposed
+ * manually in the header below (may be moved).
+ */
+// #include "numpy/_public_dtype_api_table.h"
+
// #if !defined(NO_IMPORT_ARRAY) && !defined(NO_IMPORT)
@NoException public static native int _import_array();
-// #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
-
-// #define import_array1(ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return ret; } }
-
-// #define import_array2(msg, ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, msg); return ret; } }
+// #define import_array() {
+// if (_import_array() < 0) {
+// PyErr_Print();
+// PyErr_SetString(
+// PyExc_ImportError,
+// "numpy._core.multiarray failed to import"
+// );
+// return NULL;
+// }
+// }
+
+// #define import_array1(ret) {
+// if (_import_array() < 0) {
+// PyErr_Print();
+// PyErr_SetString(
+// PyExc_ImportError,
+// "numpy._core.multiarray failed to import"
+// );
+// return ret;
+// }
+// }
+
+// #define import_array2(msg, ret) {
+// if (_import_array() < 0) {
+// PyErr_Print();
+// PyErr_SetString(PyExc_ImportError, msg);
+// return ret;
+// }
+// }
// #endif
@@ -4012,18 +4370,12 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
public static native @ByRef PyTypeObject PyUFunc_Type(); public static native void PyUFunc_Type(PyTypeObject setter);
-@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") PointerPointer arg1, @Cast("char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9);
-@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9);
-@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") ByteBuffer arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9);
-@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") byte[] arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9);
-@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9);
-@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") ByteBuffer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9);
-@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") byte[] arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9);
+@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void*const*") PointerPointer arg1, @Cast("const char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9);
+@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void*const*") @ByPtrPtr Pointer arg1, @Cast("const char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9);
+@NoException public static native PyObject PyUFunc_FromFuncAndData(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void*const*") @ByPtrPtr Pointer arg1, String arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9);
@NoException public static native int PyUFunc_RegisterLoopForType(PyUFuncObject arg0, int arg1, PyUFuncGenericFunction arg2, @Const IntPointer arg3, Pointer arg4);
@NoException public static native int PyUFunc_RegisterLoopForType(PyUFuncObject arg0, int arg1, PyUFuncGenericFunction arg2, @Const IntBuffer arg3, Pointer arg4);
@NoException public static native int PyUFunc_RegisterLoopForType(PyUFuncObject arg0, int arg1, PyUFuncGenericFunction arg2, @Const int[] arg3, Pointer arg4);
-@NoException public static native int PyUFunc_GenericFunction(PyUFuncObject __NPY_UNUSED_TAGGEDufunc, PyObject __NPY_UNUSED_TAGGEDargs, PyObject __NPY_UNUSED_TAGGEDkwds, @Cast("PyArrayObject**") PointerPointer __NPY_UNUSED_TAGGEDop );
-@NoException public static native int PyUFunc_GenericFunction(PyUFuncObject __NPY_UNUSED_TAGGEDufunc, PyObject __NPY_UNUSED_TAGGEDargs, PyObject __NPY_UNUSED_TAGGEDkwds, @ByPtrPtr PyArrayObject __NPY_UNUSED_TAGGEDop );
@NoException public static native void PyUFunc_f_f_As_d_d(@Cast("char**") PointerPointer arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
@NoException public static native void PyUFunc_f_f_As_d_d(@Cast("char**") @ByPtrPtr BytePointer arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
@NoException public static native void PyUFunc_f_f_As_d_d(@Cast("char**") @ByPtrPtr ByteBuffer arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
@@ -4108,30 +4460,14 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native void PyUFunc_On_Om(@Cast("char**") @ByPtrPtr BytePointer arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
@NoException public static native void PyUFunc_On_Om(@Cast("char**") @ByPtrPtr ByteBuffer arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
@NoException public static native void PyUFunc_On_Om(@Cast("char**") @ByPtrPtr byte[] arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
-@NoException public static native int PyUFunc_GetPyValues(@Cast("char*") BytePointer arg0, IntPointer arg1, IntPointer arg2, @Cast("PyObject**") PointerPointer arg3);
-@NoException public static native int PyUFunc_GetPyValues(@Cast("char*") BytePointer arg0, IntPointer arg1, IntPointer arg2, @ByPtrPtr PyObject arg3);
-@NoException public static native int PyUFunc_GetPyValues(@Cast("char*") ByteBuffer arg0, IntBuffer arg1, IntBuffer arg2, @ByPtrPtr PyObject arg3);
-@NoException public static native int PyUFunc_GetPyValues(@Cast("char*") byte[] arg0, int[] arg1, int[] arg2, @ByPtrPtr PyObject arg3);
-@NoException public static native int PyUFunc_checkfperr(int arg0, PyObject arg1, IntPointer arg2);
-@NoException public static native int PyUFunc_checkfperr(int arg0, PyObject arg1, IntBuffer arg2);
-@NoException public static native int PyUFunc_checkfperr(int arg0, PyObject arg1, int[] arg2);
@NoException public static native void PyUFunc_clearfperr();
@NoException public static native int PyUFunc_getfperr();
-@NoException public static native int PyUFunc_handlefperr(int arg0, PyObject arg1, int arg2, IntPointer arg3);
-@NoException public static native int PyUFunc_handlefperr(int arg0, PyObject arg1, int arg2, IntBuffer arg3);
-@NoException public static native int PyUFunc_handlefperr(int arg0, PyObject arg1, int arg2, int[] arg3);
@NoException public static native int PyUFunc_ReplaceLoopBySignature(PyUFuncObject arg0, PyUFuncGenericFunction arg1, @Const IntPointer arg2, @ByPtrPtr PyUFuncGenericFunction arg3);
@NoException public static native int PyUFunc_ReplaceLoopBySignature(PyUFuncObject arg0, PyUFuncGenericFunction arg1, @Const IntBuffer arg2, @ByPtrPtr PyUFuncGenericFunction arg3);
@NoException public static native int PyUFunc_ReplaceLoopBySignature(PyUFuncObject arg0, PyUFuncGenericFunction arg1, @Const int[] arg2, @ByPtrPtr PyUFuncGenericFunction arg3);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") PointerPointer arg1, @Cast("char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") ByteBuffer arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9, String arg10);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") byte[] arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9, String arg10);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") ByteBuffer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") byte[] arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9, String arg10);
-@NoException public static native int PyUFunc_SetUsesArraysAsData(@Cast("void**") PointerPointer __NPY_UNUSED_TAGGEDdata, @Cast("size_t") long __NPY_UNUSED_TAGGEDi );
-@NoException public static native int PyUFunc_SetUsesArraysAsData(@Cast("void**") @ByPtrPtr Pointer __NPY_UNUSED_TAGGEDdata, @Cast("size_t") long __NPY_UNUSED_TAGGEDi );
+@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void*const*") PointerPointer arg1, @Cast("const char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10);
+@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void*const*") @ByPtrPtr Pointer arg1, @Cast("const char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10);
+@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignature(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void*const*") @ByPtrPtr Pointer arg1, String arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9, String arg10);
@NoException public static native void PyUFunc_e_e(@Cast("char**") PointerPointer arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
@NoException public static native void PyUFunc_e_e(@Cast("char**") @ByPtrPtr BytePointer arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
@NoException public static native void PyUFunc_e_e(@Cast("char**") @ByPtrPtr ByteBuffer arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
@@ -4158,17 +4494,19 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
@NoException public static native void PyUFunc_ee_e_As_dd_d(@Cast("char**") @ByPtrPtr byte[] arg0, @Cast("const npy_intp*") SizeTPointer arg1, @Cast("const npy_intp*") SizeTPointer arg2, Pointer arg3);
@NoException public static native int PyUFunc_DefaultTypeResolver(PyUFuncObject arg0, @Cast("NPY_CASTING") int arg1, @Cast("PyArrayObject**") PointerPointer arg2, PyObject arg3, @Cast("PyArray_Descr**") PointerPointer arg4);
@NoException public static native int PyUFunc_DefaultTypeResolver(PyUFuncObject arg0, @Cast("NPY_CASTING") int arg1, @ByPtrPtr PyArrayObject arg2, PyObject arg3, @ByPtrPtr PyArray_Descr arg4);
-@NoException public static native int PyUFunc_ValidateCasting(PyUFuncObject arg0, @Cast("NPY_CASTING") int arg1, @Cast("PyArrayObject**") PointerPointer arg2, @Cast("PyArray_Descr**") PointerPointer arg3);
+@NoException public static native int PyUFunc_ValidateCasting(PyUFuncObject arg0, @Cast("NPY_CASTING") int arg1, @Cast("PyArrayObject**") PointerPointer arg2, @Cast("PyArray_Descr*const*") PointerPointer arg3);
@NoException public static native int PyUFunc_ValidateCasting(PyUFuncObject arg0, @Cast("NPY_CASTING") int arg1, @ByPtrPtr PyArrayObject arg2, @ByPtrPtr PyArray_Descr arg3);
@NoException public static native int PyUFunc_RegisterLoopForDescr(PyUFuncObject arg0, PyArray_Descr arg1, PyUFuncGenericFunction arg2, @Cast("PyArray_Descr**") PointerPointer arg3, Pointer arg4);
@NoException public static native int PyUFunc_RegisterLoopForDescr(PyUFuncObject arg0, PyArray_Descr arg1, PyUFuncGenericFunction arg2, @ByPtrPtr PyArray_Descr arg3, Pointer arg4);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") PointerPointer arg1, @Cast("char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10, PyObject arg11);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10, PyObject arg11);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") ByteBuffer arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9, String arg10, PyObject arg11);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") byte[] arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10, PyObject arg11);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9, String arg10, PyObject arg11);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") ByteBuffer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10, PyObject arg11);
-@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void**") @ByPtrPtr Pointer arg1, @Cast("char*") byte[] arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9, String arg10, PyObject arg11);
+@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void*const*") PointerPointer arg1, @Cast("const char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10, PyObject arg11);
+@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void*const*") @ByPtrPtr Pointer arg1, @Cast("const char*") BytePointer arg2, int arg3, int arg4, int arg5, int arg6, @Cast("const char*") BytePointer arg7, @Cast("const char*") BytePointer arg8, int arg9, @Cast("const char*") BytePointer arg10, PyObject arg11);
+@NoException public static native PyObject PyUFunc_FromFuncAndDataAndSignatureAndIdentity(@ByPtrPtr PyUFuncGenericFunction arg0, @Cast("void*const*") @ByPtrPtr Pointer arg1, String arg2, int arg3, int arg4, int arg5, int arg6, String arg7, String arg8, int arg9, String arg10, PyObject arg11);
+@NoException public static native int PyUFunc_AddLoopFromSpec(PyObject arg0, PyArrayMethod_Spec arg1);
+@NoException public static native int PyUFunc_AddPromoter(PyObject arg0, PyObject arg1, PyObject arg2);
+@NoException public static native int PyUFunc_AddWrappingLoop(PyObject arg0, @Cast("PyArray_DTypeMeta**") PointerPointer new_dtypes, @Cast("PyArray_DTypeMeta**") PointerPointer wrapped_dtypes, PyArrayMethod_TranslateGivenDescriptors arg3, PyArrayMethod_TranslateLoopDescriptors arg4);
+@NoException public static native int PyUFunc_AddWrappingLoop(PyObject arg0, @ByPtrPtr PyArray_DTypeMeta new_dtypes, @ByPtrPtr PyArray_DTypeMeta wrapped_dtypes, PyArrayMethod_TranslateGivenDescriptors arg3, PyArrayMethod_TranslateLoopDescriptors arg4);
+@NoException public static native int PyUFunc_GiveFloatingpointErrors(@Cast("const char*") BytePointer arg0, int arg1);
+@NoException public static native int PyUFunc_GiveFloatingpointErrors(String arg0, int arg1);
// #else
@@ -4206,9 +4544,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
// Targeting ../PyUFunc_TypeResolutionFunc.java
-// Targeting ../PyUFunc_LegacyInnerLoopSelectionFunc.java
-
-
// Targeting ../PyUFuncObject.java
@@ -4222,34 +4557,10 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
/* flags inferred during execution */
public static final int UFUNC_CORE_DIM_MISSING = 0x00040000;
-public static final int UFUNC_ERR_IGNORE = 0;
-public static final int UFUNC_ERR_WARN = 1;
-public static final int UFUNC_ERR_RAISE = 2;
-public static final int UFUNC_ERR_CALL = 3;
-public static final int UFUNC_ERR_PRINT = 4;
-public static final int UFUNC_ERR_LOG = 5;
-
- /* Python side integer mask */
-
-public static final int UFUNC_MASK_DIVIDEBYZERO = 0x07;
-public static final int UFUNC_MASK_OVERFLOW = 0x3f;
-public static final int UFUNC_MASK_UNDERFLOW = 0x1ff;
-public static final int UFUNC_MASK_INVALID = 0xfff;
-
-public static final int UFUNC_SHIFT_DIVIDEBYZERO = 0;
-public static final int UFUNC_SHIFT_OVERFLOW = 3;
-public static final int UFUNC_SHIFT_UNDERFLOW = 6;
-public static final int UFUNC_SHIFT_INVALID = 9;
-
public static final int UFUNC_OBJ_ISOBJECT = 1;
public static final int UFUNC_OBJ_NEEDS_API = 2;
- /* Default user error mode */
-public static final int UFUNC_ERR_DEFAULT =
- (UFUNC_ERR_WARN << UFUNC_SHIFT_DIVIDEBYZERO) +
- (UFUNC_ERR_WARN << UFUNC_SHIFT_OVERFLOW) +
- (UFUNC_ERR_WARN << UFUNC_SHIFT_INVALID);
// #if NPY_ALLOW_THREADS
// #define NPY_LOOP_BEGIN_THREADS do {if (!(loop->obj & UFUNC_OBJ_NEEDS_API)) _save = PyEval_SaveThread();} while (0);
@@ -4302,8 +4613,6 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
-// #include "__ufunc_api.h"
-
public static final String UFUNC_PYVALS_NAME = "UFUNC_PYVALS";
/*
@@ -4328,6 +4637,8 @@ entry of the tuple (i.e. a duplicate dictionary entry in the fields
// #endif
// #endif
+// #include "__ufunc_api.h"
+
// #ifdef __cplusplus
// #endif
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/npy_cdouble.java b/numpy/src/gen/java/org/bytedeco/numpy/npy_cdouble.java
index 1f8764e087a..8fe3abfd1d1 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/npy_cdouble.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/npy_cdouble.java
@@ -14,7 +14,9 @@
import static org.bytedeco.numpy.global.numpy.*;
-// #endif
+
+// #if defined(__cplusplus)
+
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class npy_cdouble extends Pointer {
static { Loader.load(); }
@@ -32,5 +34,7 @@ public class npy_cdouble extends Pointer {
@Override public npy_cdouble getPointer(long i) {
return new npy_cdouble((Pointer)this).offsetAddress(i);
}
- public native double real(); public native npy_cdouble real(double setter);
-public native double imag(); public native npy_cdouble imag(double setter); }
+
+ public native double _Val(int i); public native npy_cdouble _Val(int i, double setter);
+ @MemberGetter public native DoublePointer _Val();
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/npy_cfloat.java b/numpy/src/gen/java/org/bytedeco/numpy/npy_cfloat.java
index 312e158e8c4..34d61a9fbb6 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/npy_cfloat.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/npy_cfloat.java
@@ -14,7 +14,7 @@
import static org.bytedeco.numpy.global.numpy.*;
-// #endif
+
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class npy_cfloat extends Pointer {
static { Loader.load(); }
@@ -32,5 +32,7 @@ public class npy_cfloat extends Pointer {
@Override public npy_cfloat getPointer(long i) {
return new npy_cfloat((Pointer)this).offsetAddress(i);
}
- public native float real(); public native npy_cfloat real(float setter);
-public native float imag(); public native npy_cfloat imag(float setter); }
+
+ public native float _Val(int i); public native npy_cfloat _Val(int i, float setter);
+ @MemberGetter public native FloatPointer _Val();
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/npy_clongdouble.java b/numpy/src/gen/java/org/bytedeco/numpy/npy_clongdouble.java
index 0f549205e57..6f06e2bdec0 100644
--- a/numpy/src/gen/java/org/bytedeco/numpy/npy_clongdouble.java
+++ b/numpy/src/gen/java/org/bytedeco/numpy/npy_clongdouble.java
@@ -14,7 +14,7 @@
import static org.bytedeco.numpy.global.numpy.*;
-// #endif
+
@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
public class npy_clongdouble extends Pointer {
static { Loader.load(); }
@@ -32,5 +32,7 @@ public class npy_clongdouble extends Pointer {
@Override public npy_clongdouble getPointer(long i) {
return new npy_clongdouble((Pointer)this).offsetAddress(i);
}
- public native @Cast("npy_longdouble") double real(); public native npy_clongdouble real(double setter);
-public native @Cast("npy_longdouble") double imag(); public native npy_clongdouble imag(double setter); }
+
+ public native @Cast("long double") double _Val(int i); public native npy_clongdouble _Val(int i, double setter);
+ @MemberGetter public native @Cast("long double*") Pointer _Val();
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/npy_packed_static_string.java b/numpy/src/gen/java/org/bytedeco/numpy/npy_packed_static_string.java
new file mode 100644
index 00000000000..bad96559d79
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/npy_packed_static_string.java
@@ -0,0 +1,34 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+
+/****************************************
+ * NpyString
+ *
+ * Types used by the NpyString API.
+ ****************************************/
+
+/*
+ * A "packed" encoded string. The string data must be accessed by first unpacking the string.
+ */
+@Opaque @Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class npy_packed_static_string extends Pointer {
+ /** Empty constructor. Calls {@code super((Pointer)null)}. */
+ public npy_packed_static_string() { super((Pointer)null); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public npy_packed_static_string(Pointer p) { super(p); }
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/npy_static_string.java b/numpy/src/gen/java/org/bytedeco/numpy/npy_static_string.java
new file mode 100644
index 00000000000..6cc1722c07e
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/npy_static_string.java
@@ -0,0 +1,41 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+/*
+ * An unpacked read-only view onto the data in a packed string
+ */
+@Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class npy_static_string extends Pointer {
+ static { Loader.load(); }
+ /** Default native constructor. */
+ public npy_static_string() { super((Pointer)null); allocate(); }
+ /** Native array allocator. Access with {@link Pointer#position(long)}. */
+ public npy_static_string(long size) { super((Pointer)null); allocateArray(size); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public npy_static_string(Pointer p) { super(p); }
+ private native void allocate();
+ private native void allocateArray(long size);
+ @Override public npy_static_string position(long position) {
+ return (npy_static_string)super.position(position);
+ }
+ @Override public npy_static_string getPointer(long i) {
+ return new npy_static_string((Pointer)this).offsetAddress(i);
+ }
+
+ public native @Cast("size_t") long size(); public native npy_static_string size(long setter);
+ public native @Cast("const char*") BytePointer buf(); public native npy_static_string buf(BytePointer setter);
+}
diff --git a/numpy/src/gen/java/org/bytedeco/numpy/npy_string_allocator.java b/numpy/src/gen/java/org/bytedeco/numpy/npy_string_allocator.java
new file mode 100644
index 00000000000..dc48494cdd3
--- /dev/null
+++ b/numpy/src/gen/java/org/bytedeco/numpy/npy_string_allocator.java
@@ -0,0 +1,27 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.numpy;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import static org.bytedeco.openblas.global.openblas_nolapack.*;
+import static org.bytedeco.openblas.global.openblas.*;
+import org.bytedeco.cpython.*;
+import static org.bytedeco.cpython.global.python.*;
+
+import static org.bytedeco.numpy.global.numpy.*;
+
+
+/*
+ * Handles heap allocations for static strings.
+ */
+@Opaque @Properties(inherit = org.bytedeco.numpy.presets.numpy.class)
+public class npy_string_allocator extends Pointer {
+ /** Empty constructor. Calls {@code super((Pointer)null)}. */
+ public npy_string_allocator() { super((Pointer)null); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public npy_string_allocator(Pointer p) { super(p); }
+}
diff --git a/numpy/src/main/java/org/bytedeco/numpy/presets/numpy.java b/numpy/src/main/java/org/bytedeco/numpy/presets/numpy.java
index 2873528887f..c850c9aedc8 100644
--- a/numpy/src/main/java/org/bytedeco/numpy/presets/numpy.java
+++ b/numpy/src/main/java/org/bytedeco/numpy/presets/numpy.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019-2023 Samuel Audet
+ * Copyright (C) 2019-2024 Samuel Audet
*
* Licensed either under the Apache License, Version 2.0, or (at your option)
* under the terms of the GNU General Public License as published by
@@ -44,6 +44,7 @@
inherit = {openblas.class, python.class},
value = {
@Platform(
+ define = "NPY_TARGET_VERSION NPY_2_0_API_VERSION",
cinclude = {
"_numpyconfig.h",
"numpyconfig.h",
@@ -52,7 +53,7 @@
"npy_os.h",
"npy_cpu.h",
"npy_endian.h",
- "npy_interrupt.h",
+// "npy_interrupt.h",
"npy_math.h",
// "npy_math_internal.h",
"halffloat.h",
@@ -61,6 +62,9 @@
"arrayscalars.h",
"ndarraytypes.h",
"ndarrayobject.h",
+ "dtype_api.h",
+ "npy_2_compat.h",
+ "npy_2_complexcompat.h",
"__multiarray_api.h",
"_neighborhood_iterator_imp.h",
// "noprefix.h",
@@ -104,9 +108,9 @@ public static File[] cachePackages() throws IOException {
public void map(InfoMap infoMap) {
infoMap.put(new Info("__multiarray_api.h").linePatterns("#define PyArray_GetNDArrayCVersion .*",
- "#define PyDataMem_DefaultHandler .*").skip())
+ " PyArray_API\\[365\\]\\)").skip())
.put(new Info("__ufunc_api.h").linePatterns("#define PyUFunc_Type .*",
- " PyUFunc_API\\[42\\]\\)").skip())
+ " PyUFunc_API\\[46\\]\\)").skip())
.put(new Info("npy_math.h").linePatterns("#define npy_.*").skip())
.put(new Info("NPY_VISIBILITY_HIDDEN", "NPY_FEATURE_VERSION", "NPY_NOINLINE", "NPY_GCC_UNROLL_LOOPS", "NPY_GCC_OPT_3",
@@ -145,11 +149,11 @@ public void map(InfoMap infoMap) {
.put(new Info("defined(_MSC_VER) && defined(_WIN64) && (_MSC_VER > 1400) ||"
+ " defined(__MINGW32__) || defined(__MINGW64__)",
- "NPY_FEATURE_VERSION >= NPY_1_20_API_VERSION",
- "NPY_FEATURE_VERSION >= NPY_1_22_API_VERSION",
+ "NPY_ABI_VERSION < 0x02000000",
"defined(NPY_INTERNAL_BUILD) && NPY_INTERNAL_BUILD",
"NPY_SIZEOF_PY_INTPTR_T == NPY_SIZEOF_INT",
"NPY_SIZEOF_PY_INTPTR_T == NPY_SIZEOF_LONG",
+ "NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE",
"NPY_BITSOF_LONG == 8", "NPY_BITSOF_LONGLONG == 8",
"NPY_BITSOF_LONG == 16", "NPY_BITSOF_LONGLONG == 16",
"NPY_BITSOF_LONG == 32", "NPY_BITSOF_LONGLONG == 32",
@@ -162,12 +166,15 @@ public void map(InfoMap infoMap) {
.put(new Info("NPY_BITSOF_LONG == 64", "NPY_BITSOF_LONGLONG == 64",
"NPY_BITSOF_INT == 32", "NPY_BITSOF_SHORT == 16",
+ "NPY_FEATURE_VERSION >= NPY_2_0_API_VERSION",
+ "NPY_FEATURE_VERSION >= NPY_1_20_API_VERSION",
+ "NPY_FEATURE_VERSION >= NPY_1_22_API_VERSION",
"PY_VERSION_HEX >= 0x03080000").define(true))
.put(new Info("NPY_MAX_INT", "INT_MIN", "NPY_MIN_INT", "NPY_MAX_UINT", "NPY_MAX_LONG", "NPY_MIN_LONG", "NPY_MAX_ULONG",
"NPY_INTP", "NPY_UINTP", "NPY_MAX_INTP", "NPY_MIN_INTP", "NPY_MAX_UINTP").translate(false).cppTypes("long"))
- .put(new Info("NPY_SIZEOF_SHORT", "NPY_SIZEOF_INT", "NPY_SIZEOF_LONG",
+ .put(new Info("NPY_SIZEOF_SHORT", "NPY_SIZEOF_INT", "NPY_SIZEOF_LONG", "NPY_SIZEOF_HASH_T",
"NPY_MAX_BYTE", "NPY_MIN_BYTE", "NPY_MAX_UBYTE", "NPY_MAX_SHORT", "NPY_MIN_SHORT", "NPY_MAX_USHORT",
"NPY_BITSOF_CHAR", "NPY_BITSOF_BYTE", "NPY_BITSOF_SHORT", "NPY_BITSOF_INT", "NPY_BITSOF_LONG", "NPY_BITSOF_LONGLONG",
"NPY_BITSOF_INTP", "NPY_BITSOF_HALF", "NPY_BITSOF_FLOAT", "NPY_BITSOF_DOUBLE", "NPY_BITSOF_LONGDOUBLE",
@@ -188,7 +195,7 @@ public void map(InfoMap infoMap) {
.put(new Info("PyArrayDescr_TypeFull").javaText(
"public static native @ByRef PyTypeObject PyArrayDescr_Type(); public static native void PyArrayDescr_Type(PyTypeObject setter);"))
- .put(new Info("PyArrayMapIter_Type", "PyArrayNeighborhoodIter_Type",
+ .put(new Info("PyArrayMapIter_Type", "PyArrayNeighborhoodIter_Type", "longdouble_t",
"PyArray_HANDLER", "PyDataMem_SetHandler", "PyDataMem_GetHandler").skip())
;
}
diff --git a/opencv/README.md b/opencv/README.md
index 84b0e79ca74..6ef3392efa8 100644
--- a/opencv/README.md
+++ b/opencv/README.md
@@ -9,7 +9,7 @@ Introduction
------------
This directory contains the JavaCPP Presets module for:
- * OpenCV 4.9.0 http://opencv.org/
+ * OpenCV 4.10.0 http://opencv.org/
Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.
@@ -49,14 +49,14 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
org.bytedeco
opencv-platform
- 4.9.0-1.5.11-SNAPSHOT
+ 4.10.0-1.5.11-SNAPSHOT
org.bytedeco
opencv-platform-gpu
- 4.9.0-1.5.11-SNAPSHOT
+ 4.10.0-1.5.11-SNAPSHOT
@@ -77,7 +77,7 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
org.bytedeco
numpy-platform
- 1.26.4-1.5.11-SNAPSHOT
+ 2.0.0-1.5.11-SNAPSHOT
diff --git a/opencv/cppbuild.sh b/opencv/cppbuild.sh
index 6b470cb3c07..40db25e4f20 100755
--- a/opencv/cppbuild.sh
+++ b/opencv/cppbuild.sh
@@ -27,7 +27,7 @@ if [[ -n "${BUILD_PATH:-}" ]]; then
CPYTHON_PATH="$P"
elif [[ -f "$P/include/openblas_config.h" ]]; then
OPENBLAS_PATH="$P"
- elif [[ -f "$P/python/numpy/core/include/numpy/numpyconfig.h" ]]; then
+ elif [[ -f "$P/python/numpy/_core/include/numpy/numpyconfig.h" ]]; then
NUMPY_PATH="$P"
fi
done
@@ -123,7 +123,7 @@ sedinplace '/if(PYTHONINTERP_FOUND)/a\
' cmake/OpenCVDetectPython.cmake
sedinplace '/execute_process/{N;N;N;d;}' cmake/OpenCVDetectPython.cmake
-BUILD_X="-DBUILD_ANDROID_EXAMPLES=OFF -DBUILD_ANDROID_PROJECTS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_JASPER=ON -DBUILD_JPEG=ON -DBUILD_WEBP=ON -DBUILD_OPENEXR=ON -DBUILD_PNG=ON -DBUILD_TIFF=ON -DBUILD_ZLIB=ON -DBUILD_opencv_java=ON -DBUILD_opencv_objc=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=ON -DOPENCV_SKIP_PYTHON_LOADER=ON -DPYTHON3_EXECUTABLE=$PYTHON3_EXECUTABLE -DPYTHON3_INCLUDE_DIR=$PYTHON3_INCLUDE_DIR -DPYTHON3_LIBRARY=$PYTHON3_LIBRARY -DPYTHON3_PACKAGES_PATH=$PYTHON3_PACKAGES_PATH -DPYTHON3_NUMPY_INCLUDE_DIRS=$NUMPY_PATH/python/numpy/core/include/ -DBUILD_opencv_gapi=OFF -DBUILD_opencv_hdf=OFF -DBUILD_opencv_sfm=OFF -DBUILD_opencv_img_hash=ON"
+BUILD_X="-DBUILD_ANDROID_EXAMPLES=OFF -DBUILD_ANDROID_PROJECTS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_JASPER=ON -DBUILD_JPEG=ON -DBUILD_WEBP=ON -DBUILD_OPENEXR=ON -DBUILD_PNG=ON -DBUILD_TIFF=ON -DBUILD_ZLIB=ON -DBUILD_opencv_java=ON -DBUILD_opencv_objc=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=ON -DOPENCV_SKIP_PYTHON_LOADER=ON -DPYTHON3_EXECUTABLE=$PYTHON3_EXECUTABLE -DPYTHON3_INCLUDE_DIR=$PYTHON3_INCLUDE_DIR -DPYTHON3_LIBRARY=$PYTHON3_LIBRARY -DPYTHON3_PACKAGES_PATH=$PYTHON3_PACKAGES_PATH -DPYTHON3_NUMPY_INCLUDE_DIRS=$NUMPY_PATH/python/numpy/_core/include/ -DBUILD_opencv_gapi=OFF -DBUILD_opencv_hdf=OFF -DBUILD_opencv_sfm=OFF -DBUILD_opencv_img_hash=ON"
# support for OpenMP is NOT thread-safe so make sure to never enable it and use pthreads instead
WITH_X="-DWITH_1394=OFF -DWITH_FFMPEG=OFF -DWITH_GSTREAMER=OFF -DWITH_IPP=OFF -DWITH_LAPACK=ON -DWITH_OPENCL=ON -DWITH_OPENJPEG=OFF -DWITH_OPENMP=OFF -DOPENCV_ENABLE_NONFREE=ON -DWITH_VA=OFF -DWITH_INF_ENGINE=OFF -DWITH_EIGEN=OFF -DENABLE_CXX11=ON -DENABLE_LIBJPEG_TURBO_SIMD=OFF"
diff --git a/opencv/platform/gpu/pom.xml b/opencv/platform/gpu/pom.xml
index d396e019a2a..6c241bfdeda 100644
--- a/opencv/platform/gpu/pom.xml
+++ b/opencv/platform/gpu/pom.xml
@@ -12,7 +12,7 @@
org.bytedeco
opencv-platform-gpu
- 4.9.0-${project.parent.version}
+ 4.10.0-${project.parent.version}
JavaCPP Presets Platform GPU for OpenCV
diff --git a/opencv/pom.xml b/opencv/pom.xml
index 9520bda6fc7..bdf74bbe2b3 100644
--- a/opencv/pom.xml
+++ b/opencv/pom.xml
@@ -23,7 +23,7 @@
org.bytedeco
numpy
- 1.26.4-${project.parent.version}
+ 2.0.0-${project.parent.version}
true
@@ -67,7 +67,7 @@
org.bytedeco
numpy-platform
- 1.26.4-${project.parent.version}
+ 2.0.0-${project.parent.version}
diff --git a/opencv/samples/pom.xml b/opencv/samples/pom.xml
index 199de5d82ef..27879e83205 100644
--- a/opencv/samples/pom.xml
+++ b/opencv/samples/pom.xml
@@ -12,14 +12,14 @@
org.bytedeco
opencv-platform
- 4.9.0-1.5.11-SNAPSHOT
+ 4.10.0-1.5.11-SNAPSHOT
org.bytedeco
opencv-platform-gpu
- 4.9.0-1.5.11-SNAPSHOT
+ 4.10.0-1.5.11-SNAPSHOT
@@ -40,7 +40,7 @@
org.bytedeco
numpy-platform
- 1.26.4-1.5.11-SNAPSHOT
+ 2.0.0-1.5.11-SNAPSHOT
diff --git a/platform/pom.xml b/platform/pom.xml
index acc431f13ef..ef79c788b63 100644
--- a/platform/pom.xml
+++ b/platform/pom.xml
@@ -217,12 +217,12 @@
org.bytedeco
numpy-platform
- 1.26.4-${project.version}
+ 2.0.0-${project.version}
org.bytedeco
scipy-platform
- 1.13.1-${project.version}
+ 1.14.0-${project.version}
@@ -257,7 +257,7 @@
org.bytedeco
tesseract-platform
- 5.3.4-${project.version}
+ 5.4.1-${project.version}
diff --git a/pytorch/cppbuild.sh b/pytorch/cppbuild.sh
index 523a8785296..1d805c3af39 100755
--- a/pytorch/cppbuild.sh
+++ b/pytorch/cppbuild.sh
@@ -71,7 +71,7 @@ if [[ -n "${BUILD_PATH:-}" ]]; then
fi
elif [[ -f "$P/include/openblas_config.h" ]]; then
OPENBLAS_PATH="$P"
- elif [[ -f "$P/python/numpy/core/include/numpy/numpyconfig.h" ]]; then
+ elif [[ -f "$P/python/numpy/_core/include/numpy/numpyconfig.h" ]]; then
NUMPY_PATH="$P"
fi
done
diff --git a/pytorch/pom.xml b/pytorch/pom.xml
index b405fa90ac5..9ccf181e047 100644
--- a/pytorch/pom.xml
+++ b/pytorch/pom.xml
@@ -46,7 +46,7 @@
org.bytedeco
numpy-platform
- 1.26.4-${project.parent.version}
+ 2.0.0-${project.parent.version}
org.bytedeco
diff --git a/scipy/README.md b/scipy/README.md
index 7c4f21651f6..10edbc2a1cb 100644
--- a/scipy/README.md
+++ b/scipy/README.md
@@ -9,7 +9,7 @@ Introduction
------------
This directory contains the JavaCPP Presets module for:
- * SciPy 1.13.1 https://www.scipy.org/
+ * SciPy 1.14.0 https://www.scipy.org/
Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.
@@ -48,7 +48,7 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
org.bytedeco
scipy-platform
- 1.13.1-1.5.11-SNAPSHOT
+ 1.14.0-1.5.11-SNAPSHOT
diff --git a/scipy/cppbuild.sh b/scipy/cppbuild.sh
index 24cd9bddf54..350cf7ed03f 100755
--- a/scipy/cppbuild.sh
+++ b/scipy/cppbuild.sh
@@ -8,12 +8,13 @@ if [[ -z "$PLATFORM" ]]; then
fi
BOOST=1_75_0
-SCIPY_VERSION=1.13.1
+SCIPY_VERSION=1.14.0rc2
download http://downloads.sourceforge.net/project/boost/boost/${BOOST//_/.}/boost_$BOOST.tar.gz boost_$BOOST.tar.gz
-download https://github.com/data-apis/array-api-compat/archive/05548f0.tar.gz array-api-compat-05548f0.tar.gz
+download https://github.com/data-apis/array-api-compat/archive/fd22a73.tar.gz array-api-compat-fd22a73.tar.gz
+download https://github.com/cobyqa/cobyqa/archive/7f40b6d.tar.gz cobyqa-7f40b6d.tar.gz
download https://github.com/scipy/HiGHS/archive/4a12295.tar.gz HiGHS-4a12295.tar.gz
download https://github.com/scipy/unuran/archive/21810c8.tar.gz unuran-21810c8.tar.gz
-download https://github.com/scipy/pocketfft/archive/0bf2b51.tar.gz pocketfft-0bf2b51.tar.gz
+download https://github.com/scipy/pocketfft/archive/9367142.tar.gz pocketfft-9367142.tar.gz
download https://github.com/scipy/PROPACK/archive/96f6800.tar.gz PROPACK-96f6800.tar.gz
download https://github.com/scipy/scipy/archive/v$SCIPY_VERSION.tar.gz scipy-$SCIPY_VERSION.tar.gz
@@ -39,7 +40,7 @@ if [[ -n "${BUILD_PATH:-}" ]]; then
fi
elif [[ -f "$P/include/openblas_config.h" ]]; then
OPENBLAS_PATH="$P"
- elif [[ -f "$P/python/numpy/core/include/numpy/numpyconfig.h" ]]; then
+ elif [[ -f "$P/python/numpy/_core/include/numpy/numpyconfig.h" ]]; then
NUMPY_PATH="$P"
fi
done
@@ -54,6 +55,7 @@ NUMPY_PATH="${NUMPY_PATH//\\//}"
echo "Decompressing archives..."
tar --totals -xzf ../boost_$BOOST.tar.gz
tar --totals -xzf ../array-api-compat-*.tar.gz
+tar --totals -xzf ../cobyqa-*.tar.gz
tar --totals -xzf ../HiGHS-*.tar.gz
tar --totals -xzf ../unuran-*.tar.gz
tar --totals -xzf ../pocketfft-*.tar.gz
@@ -61,6 +63,7 @@ tar --totals -xzf ../PROPACK-*.tar.gz
tar --totals -xzf ../scipy-$SCIPY_VERSION.tar.gz
cp -a boost_$BOOST/* scipy-$SCIPY_VERSION/scipy/_lib/boost_math/
cp -a array-api-compat-*/* scipy-$SCIPY_VERSION/scipy/_lib/array_api_compat/
+cp -a cobyqa-*/* scipy-$SCIPY_VERSION/scipy/_lib/cobyqa/
cp -a HiGHS-*/* scipy-$SCIPY_VERSION/scipy/_lib/highs/
cp -a unuran-*/* scipy-$SCIPY_VERSION/scipy/_lib/unuran/
cp -a pocketfft-*/* scipy-$SCIPY_VERSION/scipy/_lib/pocketfft/
@@ -121,7 +124,7 @@ if ! $PYTHON_BIN_PATH -m pip install --no-deps --target=$PYTHON_LIB_PATH $TOOLS;
echo "extra_link_args = -lgfortran" >> site.cfg
chmod +x "$CPYTHON_HOST_PATH/bin/python3.12"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CPYTHON_HOST_PATH/lib/:$CPYTHON_HOST_PATH"
- "$CPYTHON_HOST_PATH/bin/python3.12" -m pip install --no-deps --target="$CPYTHON_HOST_PATH/lib/python3.12/" crossenv==1.4 numpy==1.26.4 $TOOLS
+ "$CPYTHON_HOST_PATH/bin/python3.12" -m pip install --no-deps --target="$CPYTHON_HOST_PATH/lib/python3.12/" crossenv==1.4 numpy==2.0.0 $TOOLS
"$CPYTHON_HOST_PATH/bin/python3.12" -m crossenv "$PYTHON_BIN_PATH" crossenv
cp -a "$NUMPY_PATH/python/numpy" "$CPYTHON_HOST_PATH/lib/python3.12/"
# cp -a "$CPYTHON_HOST_PATH/lib/python3.12/include" "$PYTHON_LIB_PATH"
diff --git a/scipy/platform/pom.xml b/scipy/platform/pom.xml
index a16cf6fabfd..68a5cd2ccee 100644
--- a/scipy/platform/pom.xml
+++ b/scipy/platform/pom.xml
@@ -12,7 +12,7 @@
org.bytedeco
scipy-platform
- 1.13.1-${project.parent.version}
+ 1.14.0-${project.parent.version}
JavaCPP Presets Platform for SciPy
@@ -23,7 +23,7 @@
org.bytedeco
numpy-platform
- 1.26.4-${project.parent.version}
+ 2.0.0-${project.parent.version}
${project.groupId}
diff --git a/scipy/pom.xml b/scipy/pom.xml
index 71429bbbe34..8cf7e239686 100644
--- a/scipy/pom.xml
+++ b/scipy/pom.xml
@@ -11,14 +11,14 @@
org.bytedeco
scipy
- 1.13.1-${project.parent.version}
+ 1.14.0-${project.parent.version}
JavaCPP Presets for SciPy
org.bytedeco
numpy
- 1.26.4-${project.parent.version}
+ 2.0.0-${project.parent.version}
org.bytedeco
@@ -41,7 +41,7 @@
org.bytedeco
numpy
- 1.26.4-${project.parent.version}
+ 2.0.0-${project.parent.version}
org.bytedeco
@@ -58,7 +58,7 @@
org.bytedeco
numpy
- 1.26.4-${project.parent.version}
+ 2.0.0-${project.parent.version}
${javacpp.platform}
@@ -80,14 +80,14 @@
${basedir}/../cpython/cppbuild/${javacpp.platform}/include/python3.12/
${basedir}/../numpy/src/main/resources/org/bytedeco/numpy/include/
${basedir}/../numpy/target/classes/org/bytedeco/numpy/include/
- ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/core/include/
- ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/core/include/numpy/
+ ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/_core/include/
+ ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/_core/include/numpy/
${basedir}/../openblas/cppbuild/${javacpp.platform}/lib/
${basedir}/../cpython/cppbuild/${javacpp.platform}/lib/
${basedir}/../cpython/cppbuild/${javacpp.platform}/libs/
- ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/core/lib/
+ ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/_core/lib/
${basedir}/../openblas/cppbuild/${javacpp.platform}/bin/
@@ -110,8 +110,8 @@
/org/bytedeco/cpython/${javacpp.platform}/include/
/org/bytedeco/cpython/${javacpp.platform}/include/python3.12/
/org/bytedeco/numpy/include/
- /org/bytedeco/numpy/${javacpp.platform}/python/numpy/core/include/
- /org/bytedeco/numpy/${javacpp.platform}/python/numpy/core/include/numpy/
+ /org/bytedeco/numpy/${javacpp.platform}/python/numpy/_core/include/
+ /org/bytedeco/numpy/${javacpp.platform}/python/numpy/_core/include/numpy/
/${javacpp.platform.library.path}/
@@ -122,7 +122,7 @@
/org/bytedeco/cpython/${javacpp.platform}/lib/
/org/bytedeco/cpython/${javacpp.platform}/libs/
/org/bytedeco/numpy/${javacpp.platform}/
- /org/bytedeco/numpy/${javacpp.platform}/python/numpy/core/lib/
+ /org/bytedeco/numpy/${javacpp.platform}/python/numpy/_core/lib/
diff --git a/scipy/samples/pom.xml b/scipy/samples/pom.xml
index 59994dd9665..a577aa2135f 100644
--- a/scipy/samples/pom.xml
+++ b/scipy/samples/pom.xml
@@ -12,7 +12,7 @@
org.bytedeco
scipy-platform
- 1.13.1-1.5.11-SNAPSHOT
+ 1.14.0-1.5.11-SNAPSHOT
diff --git a/tesseract/README.md b/tesseract/README.md
index 6dd11c8c569..b84dd5e2c07 100644
--- a/tesseract/README.md
+++ b/tesseract/README.md
@@ -9,7 +9,7 @@ Introduction
------------
This directory contains the JavaCPP Presets module for:
- * Tesseract 5.3.4 https://github.com/tesseract-ocr
+ * Tesseract 5.4.1 https://github.com/tesseract-ocr
Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.
@@ -39,7 +39,7 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
4.0.0
org.bytedeco.tesseract
BasicExample
- 1.5.10
+ 1.5.11-SNAPSHOT
BasicExample
@@ -47,7 +47,7 @@ We can use [Maven 3](http://maven.apache.org/) to download and install automatic
org.bytedeco
tesseract-platform
- 5.3.4-1.5.10
+ 5.4.1-1.5.11-SNAPSHOT
diff --git a/tesseract/cppbuild.sh b/tesseract/cppbuild.sh
index 8e4b44ed149..27070c4b1dc 100755
--- a/tesseract/cppbuild.sh
+++ b/tesseract/cppbuild.sh
@@ -7,7 +7,7 @@ if [[ -z "$PLATFORM" ]]; then
exit
fi
-TESSERACT_VERSION=5.3.4
+TESSERACT_VERSION=5.4.1
download https://github.com/tesseract-ocr/tesseract/archive/$TESSERACT_VERSION.tar.gz tesseract-$TESSERACT_VERSION.tar.gz
mkdir -p $PLATFORM
diff --git a/tesseract/platform/pom.xml b/tesseract/platform/pom.xml
index d22fe537663..37f0d5351a8 100644
--- a/tesseract/platform/pom.xml
+++ b/tesseract/platform/pom.xml
@@ -12,7 +12,7 @@
org.bytedeco
tesseract-platform
- 5.3.4-${project.parent.version}
+ 5.4.1-${project.parent.version}
JavaCPP Presets Platform for Tesseract
diff --git a/tesseract/pom.xml b/tesseract/pom.xml
index 9af951bc501..21950f74384 100644
--- a/tesseract/pom.xml
+++ b/tesseract/pom.xml
@@ -11,7 +11,7 @@
org.bytedeco
tesseract
- 5.3.4-${project.parent.version}
+ 5.4.1-${project.parent.version}
JavaCPP Presets for Tesseract
diff --git a/tesseract/samples/pom.xml b/tesseract/samples/pom.xml
index 9fc2258fea0..df04a02842b 100644
--- a/tesseract/samples/pom.xml
+++ b/tesseract/samples/pom.xml
@@ -12,7 +12,7 @@
org.bytedeco
tesseract-platform
- 5.3.4-1.5.11-SNAPSHOT
+ 5.4.1-1.5.11-SNAPSHOT
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/BLOB_CHOICE_IT.java b/tesseract/src/gen/java/org/bytedeco/tesseract/BLOB_CHOICE_IT.java
index 4599324b15a..ce1644ee0af 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/BLOB_CHOICE_IT.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/BLOB_CHOICE_IT.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/BLOCK_LIST.java b/tesseract/src/gen/java/org/bytedeco/tesseract/BLOCK_LIST.java
index 0c2b5116a40..575675493cb 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/BLOCK_LIST.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/BLOCK_LIST.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/BlamerBundle.java b/tesseract/src/gen/java/org/bytedeco/tesseract/BlamerBundle.java
index 23277d4a315..b53544a92db 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/BlamerBundle.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/BlamerBundle.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/ByteVector.java b/tesseract/src/gen/java/org/bytedeco/tesseract/ByteVector.java
index d0f1cfb7e06..4771b63bce7 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/ByteVector.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/ByteVector.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/CANCEL_FUNC.java b/tesseract/src/gen/java/org/bytedeco/tesseract/CANCEL_FUNC.java
index 5e22213e377..eb12a0c5263 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/CANCEL_FUNC.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/CANCEL_FUNC.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/C_BLOB_IT.java b/tesseract/src/gen/java/org/bytedeco/tesseract/C_BLOB_IT.java
index 0dd6905e60b..137177b24e0 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/C_BLOB_IT.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/C_BLOB_IT.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/ChoiceIterator.java b/tesseract/src/gen/java/org/bytedeco/tesseract/ChoiceIterator.java
index ebece18b457..05c8975182e 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/ChoiceIterator.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/ChoiceIterator.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/Dawg.java b/tesseract/src/gen/java/org/bytedeco/tesseract/Dawg.java
index 81042097c16..4ad0b0f278d 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/Dawg.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/Dawg.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/Dict.java b/tesseract/src/gen/java/org/bytedeco/tesseract/Dict.java
index 374d437126a..1167e9e30bc 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/Dict.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/Dict.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/DictFunc.java b/tesseract/src/gen/java/org/bytedeco/tesseract/DictFunc.java
index 77862c76ecc..80349c15feb 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/DictFunc.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/DictFunc.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/EANYCODE_CHAR.java b/tesseract/src/gen/java/org/bytedeco/tesseract/EANYCODE_CHAR.java
index bec86b85f76..1dbe2abf90c 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/EANYCODE_CHAR.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/EANYCODE_CHAR.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/ETEXT_DESC.java b/tesseract/src/gen/java/org/bytedeco/tesseract/ETEXT_DESC.java
index 294221d28d4..1e42d1d3cd9 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/ETEXT_DESC.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/ETEXT_DESC.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/EquationDetect.java b/tesseract/src/gen/java/org/bytedeco/tesseract/EquationDetect.java
index 119d1b7151e..160375021fb 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/EquationDetect.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/EquationDetect.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/FileReader.java b/tesseract/src/gen/java/org/bytedeco/tesseract/FileReader.java
index 33816bc3049..fe3b7618426 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/FileReader.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/FileReader.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/ImageThresholder.java b/tesseract/src/gen/java/org/bytedeco/tesseract/ImageThresholder.java
index b77d45ddd7d..a56b7372158 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/ImageThresholder.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/ImageThresholder.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/LTRResultIterator.java b/tesseract/src/gen/java/org/bytedeco/tesseract/LTRResultIterator.java
index 814f87448d5..d6db6838772 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/LTRResultIterator.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/LTRResultIterator.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/MutableIterator.java b/tesseract/src/gen/java/org/bytedeco/tesseract/MutableIterator.java
index 1360751b795..f77af9ff50d 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/MutableIterator.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/MutableIterator.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/OSResults.java b/tesseract/src/gen/java/org/bytedeco/tesseract/OSResults.java
index 4489c5b0b0d..ea81d3995e8 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/OSResults.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/OSResults.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/PAGE_RES.java b/tesseract/src/gen/java/org/bytedeco/tesseract/PAGE_RES.java
index bd341373689..bc2e27bb664 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/PAGE_RES.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/PAGE_RES.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/PAGE_RES_IT.java b/tesseract/src/gen/java/org/bytedeco/tesseract/PAGE_RES_IT.java
index b27e2a78e6c..1116bfffce8 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/PAGE_RES_IT.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/PAGE_RES_IT.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/PROGRESS_FUNC.java b/tesseract/src/gen/java/org/bytedeco/tesseract/PROGRESS_FUNC.java
index 060dc5f2260..636d53d7fdb 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/PROGRESS_FUNC.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/PROGRESS_FUNC.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/PROGRESS_FUNC2.java b/tesseract/src/gen/java/org/bytedeco/tesseract/PROGRESS_FUNC2.java
index 2dac5075070..de6c38b9bc2 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/PROGRESS_FUNC2.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/PROGRESS_FUNC2.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/PageIterator.java b/tesseract/src/gen/java/org/bytedeco/tesseract/PageIterator.java
index fa4a966b180..3eec20563c4 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/PageIterator.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/PageIterator.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/ParagraphModel.java b/tesseract/src/gen/java/org/bytedeco/tesseract/ParagraphModel.java
index e7727e341d2..77968638c23 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/ParagraphModel.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/ParagraphModel.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/ProbabilityInContextFunc.java b/tesseract/src/gen/java/org/bytedeco/tesseract/ProbabilityInContextFunc.java
index 3dabb6cb063..0d082612759 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/ProbabilityInContextFunc.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/ProbabilityInContextFunc.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/ResultIterator.java b/tesseract/src/gen/java/org/bytedeco/tesseract/ResultIterator.java
index 34ed05fde4b..6c0cf5bc846 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/ResultIterator.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/ResultIterator.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/StringFloatPairVectorVector.java b/tesseract/src/gen/java/org/bytedeco/tesseract/StringFloatPairVectorVector.java
index 6c844eb3e81..765d55055a6 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/StringFloatPairVectorVector.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/StringFloatPairVectorVector.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/StringVector.java b/tesseract/src/gen/java/org/bytedeco/tesseract/StringVector.java
index 09300aa77cf..d56ca7d5caa 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/StringVector.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/StringVector.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessAltoRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessAltoRenderer.java
index 2d888d25b71..c3f43f3ba95 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessAltoRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessAltoRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessBaseAPI.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessBaseAPI.java
index 3f0ac092c89..35b04b449c7 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessBaseAPI.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessBaseAPI.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
@@ -47,16 +47,6 @@ public class TessBaseAPI extends Pointer {
*/
public static native @Cast("const char*") BytePointer Version();
- /**
- * If compiled with OpenCL AND an available OpenCL
- * device is deemed faster than serial code, then
- * "device" is populated with the cl_device_id
- * and returns sizeof(cl_device_id)
- * otherwise *device=nullptr and returns 0.
- */
- public static native @Cast("size_t") long getOpenCLDevice(@Cast("void**") PointerPointer device);
- public static native @Cast("size_t") long getOpenCLDevice(@Cast("void**") @ByPtrPtr Pointer device);
-
/**
* Set the name of the input file. Needed for training and
* reading a UNLV zone file, and for searchable PDF output.
@@ -394,6 +384,11 @@ public native void SetImage(@Cast("const unsigned char*") byte[] imagedata, int
*/
public native PIX GetThresholdedImage();
+ /**
+ * Return average gradient of lines on page.
+ */
+ public native float GetGradient();
+
/**
* Get the result of page layout analysis as a leptonica-style
* Boxa, Pixa pair, in reading order.
@@ -547,7 +542,7 @@ public native BOXA GetComponentImages(@Cast("const tesseract::PageIteratorLevel"
* timeout_millisec terminates processing if any single page
* takes too long. Set to 0 for unlimited time.
*
- * renderer is responible for creating the output. For example,
+ * renderer is responsible for creating the output. For example,
* use the TessTextRenderer if you want plaintext output, or
* the TessPDFRender to produce searchable PDF.
*
@@ -639,6 +634,18 @@ public native BOXA GetComponentImages(@Cast("const tesseract::PageIteratorLevel"
*/
public native @Cast("char*") BytePointer GetAltoText(int page_number);
+ /**
+ * Make an XML-formatted string with PAGE markup from the internal
+ * data structures.
+ */
+ public native @Cast("char*") BytePointer GetPAGEText(ETEXT_DESC monitor, int page_number);
+
+ /**
+ * Make an XML-formatted string with PAGE markup from the internal
+ * data structures.
+ */
+ public native @Cast("char*") BytePointer GetPAGEText(int page_number);
+
/**
* Make a TSV-formatted string from the internal data structures.
* page_number is 0-based but will appear in the output as 1-based.
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessBoxTextRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessBoxTextRenderer.java
index 5eb40419ec4..4a9f12bef1b 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessBoxTextRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessBoxTextRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessCancelFunc.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessCancelFunc.java
index 22458305f64..109ee1bfd70 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessCancelFunc.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessCancelFunc.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessHOcrRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessHOcrRenderer.java
index 3eaad30a06c..6fea5159f92 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessHOcrRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessHOcrRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessLSTMBoxRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessLSTMBoxRenderer.java
index d0496c6b427..28b6691f69e 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessLSTMBoxRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessLSTMBoxRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessOsdRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessOsdRenderer.java
index 813b95b4905..81c41d509c5 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessOsdRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessOsdRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessPAGERenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessPAGERenderer.java
new file mode 100644
index 00000000000..1b0f1f3bb67
--- /dev/null
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessPAGERenderer.java
@@ -0,0 +1,29 @@
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
+
+package org.bytedeco.tesseract;
+
+import java.nio.*;
+import org.bytedeco.javacpp.*;
+import org.bytedeco.javacpp.annotation.*;
+
+import static org.bytedeco.javacpp.presets.javacpp.*;
+import org.bytedeco.leptonica.*;
+import static org.bytedeco.leptonica.global.leptonica.*;
+
+import static org.bytedeco.tesseract.global.tesseract.*;
+
+
+/**
+ * Renders Tesseract output into a PAGE XML text string
+ */
+@Namespace("tesseract") @NoOffset @Properties(inherit = org.bytedeco.tesseract.presets.tesseract.class)
+public class TessPAGERenderer extends TessResultRenderer {
+ static { Loader.load(); }
+ /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
+ public TessPAGERenderer(Pointer p) { super(p); }
+
+ public TessPAGERenderer(@Cast("const char*") BytePointer outputbase) { super((Pointer)null); allocate(outputbase); }
+ private native void allocate(@Cast("const char*") BytePointer outputbase);
+ public TessPAGERenderer(String outputbase) { super((Pointer)null); allocate(outputbase); }
+ private native void allocate(String outputbase);
+}
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessPDFRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessPDFRenderer.java
index 507a275e1ec..3d998ccfbf3 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessPDFRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessPDFRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessProgressFunc.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessProgressFunc.java
index 6af9916786f..541e2cb5e8e 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessProgressFunc.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessProgressFunc.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessResultRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessResultRenderer.java
index 4cd2544cb15..f0e0ced5aa7 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessResultRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessResultRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessTextRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessTextRenderer.java
index 9e06e8828eb..ff3bb198b21 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessTextRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessTextRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessTsvRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessTsvRenderer.java
index 1815e8504d9..93e0e6bade5 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessTsvRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessTsvRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
@@ -13,6 +13,7 @@
import static org.bytedeco.tesseract.global.tesseract.*;
+
/**
* Renders Tesseract output into a TSV string
*/
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessUnlvRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessUnlvRenderer.java
index 7e0b56c195f..b008a74e2a2 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessUnlvRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessUnlvRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/TessWordStrBoxRenderer.java b/tesseract/src/gen/java/org/bytedeco/tesseract/TessWordStrBoxRenderer.java
index 27281a25664..66bb92b6896 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/TessWordStrBoxRenderer.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/TessWordStrBoxRenderer.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/Tesseract.java b/tesseract/src/gen/java/org/bytedeco/tesseract/Tesseract.java
index a35f1e2ad94..7253cef63b7 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/Tesseract.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/Tesseract.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/UNICHAR.java b/tesseract/src/gen/java/org/bytedeco/tesseract/UNICHAR.java
index 17c09027e98..4449f0165f5 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/UNICHAR.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/UNICHAR.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/UNICHARSET.java b/tesseract/src/gen/java/org/bytedeco/tesseract/UNICHARSET.java
index e7c1ca4e8a3..3eff4fe258b 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/UNICHARSET.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/UNICHARSET.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/WERD.java b/tesseract/src/gen/java/org/bytedeco/tesseract/WERD.java
index 3976e26f12c..d551ea6f90d 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/WERD.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/WERD.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/WERD_RES.java b/tesseract/src/gen/java/org/bytedeco/tesseract/WERD_RES.java
index a6dccecdb88..9158ac69f32 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/WERD_RES.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/WERD_RES.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract;
diff --git a/tesseract/src/gen/java/org/bytedeco/tesseract/global/tesseract.java b/tesseract/src/gen/java/org/bytedeco/tesseract/global/tesseract.java
index b07ede7a050..6bc99d21e07 100644
--- a/tesseract/src/gen/java/org/bytedeco/tesseract/global/tesseract.java
+++ b/tesseract/src/gen/java/org/bytedeco/tesseract/global/tesseract.java
@@ -1,4 +1,4 @@
-// Targeted by JavaCPP version 1.5.10: DO NOT EDIT THIS FILE
+// Targeted by JavaCPP version 1.5.11-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.tesseract.global;
@@ -145,15 +145,15 @@ public class tesseract extends org.bytedeco.tesseract.presets.tesseract {
// clang-format off
public static final int TESSERACT_MAJOR_VERSION = 5;
-public static final int TESSERACT_MINOR_VERSION = 3;
-public static final int TESSERACT_MICRO_VERSION = 4;
+public static final int TESSERACT_MINOR_VERSION = 4;
+public static final int TESSERACT_MICRO_VERSION = 1;
public static final int TESSERACT_VERSION =
(TESSERACT_MAJOR_VERSION << 16 |
TESSERACT_MINOR_VERSION << 8 |
TESSERACT_MICRO_VERSION);
-public static final String TESSERACT_VERSION_STR = "5.3.4";
+public static final String TESSERACT_VERSION_STR = "5.4.1";
// clang-format on
@@ -619,6 +619,9 @@ public class tesseract extends org.bytedeco.tesseract.presets.tesseract {
// Targeting ../TessAltoRenderer.java
+// Targeting ../TessPAGERenderer.java
+
+
// Targeting ../TessTsvRenderer.java
@@ -841,6 +844,8 @@ public static native TessResultRenderer TessHOcrRendererCreate2(String outputbas
@Cast("BOOL") boolean font_info);
public static native TessResultRenderer TessAltoRendererCreate(@Cast("const char*") BytePointer outputbase);
public static native TessResultRenderer TessAltoRendererCreate(String outputbase);
+public static native TessResultRenderer TessPAGERendererCreate(@Cast("const char*") BytePointer outputbase);
+public static native TessResultRenderer TessPAGERendererCreate(String outputbase);
public static native TessResultRenderer TessTsvRendererCreate(@Cast("const char*") BytePointer outputbase);
public static native TessResultRenderer TessTsvRendererCreate(String outputbase);
public static native TessResultRenderer TessPDFRendererCreate(@Cast("const char*") BytePointer outputbase,
@@ -882,9 +887,6 @@ public static native TessResultRenderer TessResultRendererNext(
public static native TessBaseAPI TessBaseAPICreate();
public static native void TessBaseAPIDelete(TessBaseAPI handle);
-public static native @Cast("size_t") long TessBaseAPIGetOpenCLDevice(TessBaseAPI handle, @Cast("void**") PointerPointer device);
-public static native @Cast("size_t") long TessBaseAPIGetOpenCLDevice(TessBaseAPI handle, @Cast("void**") @ByPtrPtr Pointer device);
-
public static native void TessBaseAPISetInputName(TessBaseAPI handle, @Cast("const char*") BytePointer name);
public static native void TessBaseAPISetInputName(TessBaseAPI handle, String name);
public static native @Cast("const char*") BytePointer TessBaseAPIGetInputName(TessBaseAPI handle);
@@ -1105,6 +1107,7 @@ public static native void TessBaseAPISetRectangle(TessBaseAPI handle, int left,
int width, int height);
public static native PIX TessBaseAPIGetThresholdedImage(TessBaseAPI handle);
+public static native float TessBaseAPIGetGradient(TessBaseAPI handle);
public static native BOXA TessBaseAPIGetRegions(TessBaseAPI handle,
@Cast("Pixa**") PointerPointer pixa);
public static native BOXA TessBaseAPIGetRegions(TessBaseAPI handle,
@@ -1224,6 +1227,7 @@ public static native int TessBaseAPIGetThresholdedImageScaleFactor(
public static native @Cast("char*") BytePointer TessBaseAPIGetHOCRText(TessBaseAPI handle, int page_number);
public static native @Cast("char*") BytePointer TessBaseAPIGetAltoText(TessBaseAPI handle, int page_number);
+public static native @Cast("char*") BytePointer TessBaseAPIGetPAGEText(TessBaseAPI handle, int page_number);
public static native @Cast("char*") BytePointer TessBaseAPIGetTsvText(TessBaseAPI handle, int page_number);
public static native @Cast("char*") BytePointer TessBaseAPIGetBoxText(TessBaseAPI handle, int page_number);
diff --git a/tesseract/src/main/java/org/bytedeco/tesseract/presets/tesseract.java b/tesseract/src/main/java/org/bytedeco/tesseract/presets/tesseract.java
index 940732bcb0e..dee350c153f 100644
--- a/tesseract/src/main/java/org/bytedeco/tesseract/presets/tesseract.java
+++ b/tesseract/src/main/java/org/bytedeco/tesseract/presets/tesseract.java
@@ -42,7 +42,7 @@
@Platform(define = "TESS_CAPI_INCLUDE_BASEAPI", include = {"tesseract/export.h", /*"tesseract/osdetect.h",*/ "tesseract/unichar.h",
"tesseract/version.h", "tesseract/publictypes.h", "tesseract/pageiterator.h", "tesseract/ocrclass.h", "tesseract/ltrresultiterator.h",
"tesseract/renderer.h", "tesseract/resultiterator.h", "tesseract/baseapi.h", "tesseract/capi.h", "locale.h"},
- compiler = "cpp11", link = "tesseract@.5.3.4"/*, resource = {"include", "lib"}*/),
+ compiler = "cpp14", link = "tesseract@.5.4.1"/*, resource = {"include", "lib"}*/),
@Platform(value = "android", link = "tesseract"),
@Platform(value = "windows", link = "tesseract53", preload = "libtesseract53") })
public class tesseract implements InfoMapper {
diff --git a/tvm/cppbuild.sh b/tvm/cppbuild.sh
index 95d81c61644..3c7c234ed1b 100755
--- a/tvm/cppbuild.sh
+++ b/tvm/cppbuild.sh
@@ -37,7 +37,7 @@ if [[ -n "${BUILD_PATH:-}" ]]; then
CPYTHON_PATH="$P"
elif [[ -f "$P/include/openblas_config.h" ]]; then
OPENBLAS_PATH="$P"
- elif [[ -f "$P/python/numpy/core/include/numpy/numpyconfig.h" ]]; then
+ elif [[ -f "$P/python/numpy/_core/include/numpy/numpyconfig.h" ]]; then
NUMPY_PATH="$P"
elif [[ -f "$P/python/scipy/version.py" ]]; then
SCIPY_PATH="$P"
diff --git a/tvm/platform/gpu/pom.xml b/tvm/platform/gpu/pom.xml
index 25b2c0a799a..f1188ef303d 100644
--- a/tvm/platform/gpu/pom.xml
+++ b/tvm/platform/gpu/pom.xml
@@ -39,7 +39,7 @@
org.bytedeco
scipy-platform
- 1.13.1-${project.parent.version}
+ 1.14.0-${project.parent.version}
org.bytedeco
diff --git a/tvm/platform/pom.xml b/tvm/platform/pom.xml
index de822cc18b7..adbd2e36955 100644
--- a/tvm/platform/pom.xml
+++ b/tvm/platform/pom.xml
@@ -38,7 +38,7 @@
org.bytedeco
scipy-platform
- 1.13.1-${project.parent.version}
+ 1.14.0-${project.parent.version}
org.bytedeco
diff --git a/tvm/pom.xml b/tvm/pom.xml
index 75076d7d1b9..2f0e59a7b0b 100644
--- a/tvm/pom.xml
+++ b/tvm/pom.xml
@@ -33,7 +33,7 @@
org.bytedeco
scipy
- 1.13.1-${project.parent.version}
+ 1.14.0-${project.parent.version}
org.bytedeco
@@ -71,7 +71,7 @@
org.bytedeco
scipy-platform
- 1.13.1-${project.parent.version}
+ 1.14.0-${project.parent.version}
@@ -104,8 +104,8 @@
${basedir}/../cpython/cppbuild/${javacpp.platform}/include/python3.12/
${basedir}/../numpy/src/main/resources/org/bytedeco/numpy/include/
${basedir}/../numpy/target/classes/org/bytedeco/numpy/include/
- ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/core/include/
- ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/core/include/numpy/
+ ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/_core/include/
+ ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/_core/include/numpy/
${basedir}/cppbuild/${javacpp.platform}${javacpp.platform.extension}/include/
@@ -115,7 +115,7 @@
${basedir}/../openblas/cppbuild/${javacpp.platform}/lib/
${basedir}/../cpython/cppbuild/${javacpp.platform}/lib/
${basedir}/../cpython/cppbuild/${javacpp.platform}/libs/
- ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/core/lib/
+ ${basedir}/../numpy/cppbuild/${javacpp.platform}/python/numpy/_core/lib/
${basedir}/cppbuild/${javacpp.platform}${javacpp.platform.extension}/lib/
@@ -151,8 +151,8 @@
/org/bytedeco/cpython/${javacpp.platform}/include/
/org/bytedeco/cpython/${javacpp.platform}/include/python3.12/
/org/bytedeco/numpy/include/
- /org/bytedeco/numpy/${javacpp.platform}/python/numpy/core/include/
- /org/bytedeco/numpy/${javacpp.platform}/python/numpy/core/include/numpy/
+ /org/bytedeco/numpy/${javacpp.platform}/python/numpy/_core/include/
+ /org/bytedeco/numpy/${javacpp.platform}/python/numpy/_core/include/numpy/
/${javacpp.platform.library.path}/
@@ -169,7 +169,7 @@
/org/bytedeco/cpython/${javacpp.platform}/lib/
/org/bytedeco/cpython/${javacpp.platform}/libs/
/org/bytedeco/numpy/${javacpp.platform}/
- /org/bytedeco/numpy/${javacpp.platform}/python/numpy/core/lib/
+ /org/bytedeco/numpy/${javacpp.platform}/python/numpy/_core/lib/