Skip to content

Commit 8603f4f

Browse files
0.16.19
kriging update completed
1 parent 4421b92 commit 8603f4f

4 files changed

Lines changed: 135 additions & 137 deletions

File tree

RELEASE_NOTES.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
spotpython-0.16.16:
2-
1+
spotpython-0.16.19:
32

3+
- kriging.py update completed
44

55
spotpython-0.16.15:
66

notebooks/00_spotPython_tests.ipynb

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6610,7 +6610,6 @@
66106610
"source": [
66116611
"from spotpython.build.kriging import Kriging\n",
66126612
"import numpy as np\n",
6613-
"import matplotlib.pyplot as plt\n",
66146613
"from numpy import linspace, arange\n",
66156614
"rng = np.random.RandomState(1)\n",
66166615
"X = linspace(start=0, stop=10, num=1_0).reshape(-1, 1)\n",
@@ -6640,8 +6639,7 @@
66406639
"source": [
66416640
"from spotpython.build.kriging import Kriging\n",
66426641
"import numpy as np\n",
6643-
"import matplotlib.pyplot as plt\n",
6644-
"from numpy import linspace, arange, empty\n",
6642+
" from numpy import linspace, arange, empty\n",
66456643
"rng = np.random.RandomState(1)\n",
66466644
"X = linspace(start=0, stop=10, num=10).reshape(-1, 1)\n",
66476645
"y = np.squeeze(X * np.sin(X))\n",
@@ -6654,8 +6652,10 @@
66546652
"s = empty(n, dtype=float)\n",
66556653
"ei = empty(n, dtype=float)\n",
66566654
"for i in range(n):\n",
6657-
" x = X[i, :]\n",
6658-
" y[i], s[i], ei[i] = S.predict_coded(x)\n",
6655+
" y_coded, s_coded, ei_coded = S.predict_coded(X[i, :])\n",
6656+
" y[i] = y_coded if np.isscalar(y_coded) else y_coded.item()\n",
6657+
" s[i] = s_coded if np.isscalar(s_coded) else s_coded.item()\n",
6658+
" ei[i] = ei_coded if np.isscalar(ei_coded) else ei_coded.item()\n",
66596659
"print(f\"y: {y}\")\n",
66606660
"print(f\"s: {s}\")\n",
66616661
"print(f\"ei: {-1.0*ei}\")"
@@ -6670,9 +6670,22 @@
66706670
},
66716671
{
66726672
"cell_type": "code",
6673-
"execution_count": null,
6673+
"execution_count": 1,
66746674
"metadata": {},
6675-
"outputs": [],
6675+
"outputs": [
6676+
{
6677+
"name": "stdout",
6678+
"output_type": "stream",
6679+
"text": [
6680+
"S.psi: [[1.83156389e-02]\n",
6681+
" [4.13993772e-08]\n",
6682+
" [4.24835426e-18]]\n",
6683+
"Control value res: [[1.83156389e-02]\n",
6684+
" [4.13993772e-08]\n",
6685+
" [4.24835426e-18]]\n"
6686+
]
6687+
}
6688+
],
66766689
"source": [
66776690
"import numpy as np\n",
66786691
"from spotpython.build.kriging import Kriging\n",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "spotpython"
10-
version = "0.16.18"
10+
version = "0.16.19"
1111
authors = [
1212
{ name="T. Bartz-Beielstein", email="tbb@bartzundbartz.de" }
1313
]

0 commit comments

Comments
 (0)