pylibkriging — Python binding for libKriging
libKriging is a C++ library for Kriging / Gaussian process
regression (fit, predict, simulate, update, input warpings, and scalable variants for large designs).
pylibkriging exposes it to Python through pybind11.
Installation
pip3 install pylibkriging
Requires Python ≥ 3.7 and NumPy (≥ 1.18, NumPy 2 is supported). Pre-built wheels are published for the usual Linux / macOS / Windows targets; see the releases page for the other packages.
Example
X is an n × d float64 array (one row per observation) and y a length-n vector.
import numpy as np
import pylibkriging as lk
X = np.array([[0.0], [0.25], [0.5], [0.75], [1.0]])
f = lambda x: 1 - 0.5 * (np.sin(12 * x) / (1 + x) + 2 * np.cos(7 * x) * x ** 5 + 0.7)
y = f(X[:, 0])
model = lk.Kriging(y, X, "matern5_2")
print(model.summary())
x = np.linspace(0, 1, 100).reshape(-1, 1)
mean, stdev, cov, mean_deriv, stdev_deriv = model.predict(x, return_stdev=True)
sims = model.simulate(nsim=10, seed=123, X=x) # shape (100, 10)
Other classes: WarpKriging (input warpings, categorical / ordinal inputs), MLPKriging, NestedKriging (large
designs), and scikit-learn compatible estimators in pylibkriging.sklearn (pip3 install pylibkriging[sklearn]). See the
method reference for all bindings and the
main README for more examples.
Building from source
Requires a C++17 compiler, CMake ≥ 3.13 and a BLAS/LAPACK implementation. From the repository root (cloned with
--recurse-submodules):
ENABLE_PYTHON_BINDING=on tools/linux-macos/install.sh
ENABLE_PYTHON_BINDING=on tools/linux-macos/build.sh
ENABLE_PYTHON_BINDING=on tools/linux-macos/test.sh
or python3 -m pip install . from the repository root to build and install the wheel directly. See
bindings/Python/README.md for the Windows commands and the other options.
To use a rebuilt module in a running interpreter:
import importlib
import pylibkriging as lk
importlib.reload(lk)
Releasing
Wheels are built and uploaded to PyPI by the release-python GitHub workflow
(.github/workflows/release-python.yml, which calls tools/release/python-release.sh) when a release tag is pushed.
Metadata
Release files for pylibkriging 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pylibkriging-1.2.2-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| pylibkriging-1.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| pylibkriging-1.2.2-cp312-cp312-macosx_26_0_universal2.whl | CPython 3.12 | CPython 3.12 | macOS 26.0+ universal2 (ARM64, x86-64) | Details |
| pylibkriging-1.2.2-cp311-cp311-win_amd64.whl | CPython 3.11 | CPython 3.11 | Windows x86-64 | Details |
| pylibkriging-1.2.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| pylibkriging-1.2.2-cp311-cp311-macosx_26_0_universal2.whl | CPython 3.11 | CPython 3.11 | macOS 26.0+ universal2 (ARM64, x86-64) | Details |
| pylibkriging-1.2.2-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
| pylibkriging-1.2.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| pylibkriging-1.2.2-cp310-cp310-macosx_26_0_universal2.whl | CPython 3.10 | CPython 3.10 | macOS 26.0+ universal2 (ARM64, x86-64) | Details |
| pylibkriging-1.2.2-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details |
| pylibkriging-1.2.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| pylibkriging-1.2.2-cp39-cp39-macosx_26_0_universal2.whl | CPython 3.9 | CPython 3.9 | macOS 26.0+ universal2 (ARM64, x86-64) | Details |
| pylibkriging-1.2.2-cp37-cp37m-win_amd64.whl | CPython 3.7 | CPython 3.7 pymalloc | Windows x86-64 | Details |
Total release size: 104.9 MB
Release files / pylibkriging-1.2.2-cp312-cp312-win_amd64.whl
| Download URL | pylibkriging-1.2.2-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
85a24204e446df1e0047e0ec523422eae916331aecc56c956342ad463fdbf130
|
|
BLAKE2b-256 checksum How to use checksums |
2a17b9660cba78d02299fa32dfa99e88428587043caeadb937023802cd3b118c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylibkriging-1.2.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 14.3 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ab147729702f3a33d5fcf7da362a761ef904c68cf3d8f7458fa13233e2fb1697
|
|
BLAKE2b-256 checksum How to use checksums |
779494ec83c3205b7f1e2af8f37a4ed8b55cdd9d80e710eca0e0c1e7fa54d4c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp312-cp312-macosx_26_0_universal2.whl
| Download URL | pylibkriging-1.2.2-cp312-cp312-macosx_26_0_universal2.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.12 macOS 26.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
f5fa44173c8e1679db2e50dbf06baf0698789efeb92d693a647a3ce48fa331de
|
|
BLAKE2b-256 checksum How to use checksums |
a0d0b45406544287b33e67bc66244d139dad1de54e3c6a3e8c7409f04f852372
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp311-cp311-win_amd64.whl
| Download URL | pylibkriging-1.2.2-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b3b827631f83d34d95286d746caf265c60a2b1fce509217a5b6e09251382421d
|
|
BLAKE2b-256 checksum How to use checksums |
36eb6c71737979b53f8af9a3e4c254fa704d29655d485594e8e06aa25d83d062
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylibkriging-1.2.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 14.3 MB |
| Tags | CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
3c194a4dbc1d496874df4fa9bcba86599860140183c040bdd5972087eff9b3b6
|
|
BLAKE2b-256 checksum How to use checksums |
d0ceb3f4c12a5fad4fefae60d9eef13551accea2ed44ec5f41da5675c0d5771c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp311-cp311-macosx_26_0_universal2.whl
| Download URL | pylibkriging-1.2.2-cp311-cp311-macosx_26_0_universal2.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 macOS 26.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
94980d40355a46a91bb9e7b6eb9aba98fcf42b78d608e4abf15198dc65996e34
|
|
BLAKE2b-256 checksum How to use checksums |
5e82255936dd0255732bc24089586b3145365534fbfbfdea8b4f6374f8eb3ba0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp310-cp310-win_amd64.whl
| Download URL | pylibkriging-1.2.2-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f8059319b743346684f30ba999e068266c36177e592e62ff9750150f3a6393b0
|
|
BLAKE2b-256 checksum How to use checksums |
6c7edcf665b5b50ad5c9130f4a38c3606e0378eaefb9e0c21f536b9fcade6940
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylibkriging-1.2.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 14.3 MB |
| Tags | CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
15d2d4cfed0a821c76e00a6afe816eb5683581ec0b285e5bfd531a18e2ee452c
|
|
BLAKE2b-256 checksum How to use checksums |
3836dc899a5e1b6faebb3ae75219b25fc7f904f3a45c1e61d5888a9bc6d4ff88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp310-cp310-macosx_26_0_universal2.whl
| Download URL | pylibkriging-1.2.2-cp310-cp310-macosx_26_0_universal2.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.10 macOS 26.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
786a8a272791137e40e0466ba7374d14222c672da2e3e0b0a1bb7702fe039608
|
|
BLAKE2b-256 checksum How to use checksums |
afd223f4c580194d78e0af98e1755d47b620d32880db65c1da5f425956aafd84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp39-cp39-win_amd64.whl
| Download URL | pylibkriging-1.2.2-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
17620dcbba6fdf573600e5377ed43128382b141a07678043cf41a736e60c4ee6
|
|
BLAKE2b-256 checksum How to use checksums |
35730de059e445b2a66f7888ebabd9ff00a1d6aff063c2dfe37ece25d5655d11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pylibkriging-1.2.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 14.3 MB |
| Tags | CPython 3.9 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
88164a178122fb1e16f7f2095564e3e196340af1cbca71aea29db3a187304eb4
|
|
BLAKE2b-256 checksum How to use checksums |
4beff733cc89ca468c6caed9f9e471cc3260a22246888b1535fff2a331f82987
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp39-cp39-macosx_26_0_universal2.whl
| Download URL | pylibkriging-1.2.2-cp39-cp39-macosx_26_0_universal2.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.9 macOS 26.0+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
dd75a0fdcdac0000583cc23dc1b043987946e8fb90563f9ef9b90293db714190
|
|
BLAKE2b-256 checksum How to use checksums |
f48e0dcdb11204032e568f2bcc11d31d537e73b7e8000b9b37c57f47ff9d1eb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / pylibkriging-1.2.2-cp37-cp37m-win_amd64.whl
| Download URL | pylibkriging-1.2.2-cp37-cp37m-win_amd64.whl |
|---|---|
| Size | 8.4 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4ef07d5dba129d7dd9aa076ce3e5b2261ebc8ad6959eac67033adc1ca412231e
|
|
BLAKE2b-256 checksum How to use checksums |
36e473dd6a869e42a974f43835bad2802ac82b076cf1ea9c2b0c569e01f1ba96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|