Constructors that create ndpolator structures from Python objects. More...
Functions | |
| ndp_axes * | ndp_axes_new_from_python (PyObject *py_axes, int nbasic) |
| Constructor for ndp_axes from Python objects. | |
| ndp_table * | ndp_table_new_from_python (PyObject *py_axes, int nbasic, PyArrayObject *py_grid) |
| Constructor for ndp_table from Python objects. | |
Constructors that create ndpolator structures from Python objects.
These functions are part of the Python C extension and handle conversion of Python objects (NumPy arrays, tuples, etc.) into native C data structures used by the core ndpolator library.
| ndp_axes * ndp_axes_new_from_python | ( | PyObject * | py_axes, |
| int | nbasic ) |
Constructor for ndp_axes from Python objects.
| py_axes | Tuple of ndarrays, one for each axis |
| nbasic | Number of basic axes |
Initializes a new ndp_axes instance by translating python data into C and then calling ndp_axes_new_from_data(). The py_axes argument must be a tuple of ndarrays, one for each axis. Each ndarray must be one-dimensional and of type NPY_DOUBLE. The nbasic argument specifies how many of the axes are basic axes; the rest are associated axes. If nbasic is set to 0, all axes are considered basic axes.
| ndp_table * ndp_table_new_from_python | ( | PyObject * | py_axes, |
| int | nbasic, | ||
| PyArrayObject * | py_grid ) |
Constructor for ndp_table from Python objects.
| py_axes | Python object containing axis data |
| nbasic | Number of basic axes |
| py_grid | Python numpy array containing grid data |
Initializes a new ndp_table instance by translating python data into C and then calling ndp_table_new_from_data(). The passed py_axes parameter must be a tuple of numpy arrays, one for each axis; the passed nbasic must be an integer that provides the number of basic axes (<= len(py_axes)), and the passed py_grid parameter must be a numpy array of the shape (n1, n2, ..., nk, ..., nN, vdim), where nk is the length of the k-th axis.