From 511052f5b6457f2641870649710e6e8709240b83 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Mon, 2 Jun 2025 08:22:05 +0200 Subject: [PATCH] update examples with python3.13 and pandapower3.1 Signed-off-by: Martijn Govers --- docs/examples/arrow_example.ipynb | 152 +++++++- .../data/pandapower/example_simple_input.json | 36 +- .../pandapower/example_simple_output.json | 40 +- docs/examples/data/tiny-net/sym_output.json | 40 +- docs/examples/data/vision/sym_output.json | 24 +- docs/examples/pandapower_example.ipynb | 350 +++++++++++++++--- docs/examples/pgm_json_example.ipynb | 188 ++++++++-- docs/examples/vision_example.ipynb | 214 +++++++++-- 8 files changed, 854 insertions(+), 190 deletions(-) diff --git a/docs/examples/arrow_example.ipynb b/docs/examples/arrow_example.ipynb index 84e5d848..b2715d16 100644 --- a/docs/examples/arrow_example.ipynb +++ b/docs/examples/arrow_example.ipynb @@ -120,13 +120,6 @@ "In this example, we use the respective primitive types for the symmetrical attributes and a `FixedSizeListArray` of the primitive types with length 3 for asymmetrical attributes. This results in them being stored as contiguous memory which would enable zero-copy conversion. Other possible workarounds to this are possible, but are beyond the scope of this example." ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "metadata": {}, @@ -146,10 +139,10 @@ "name": "stdout", "output_type": "stream", "text": [ - "-------node scehma-------\n", + "-------node schema-------\n", "id: int32\n", "u_rated: double\n", - "-------asym load scehma-------\n", + "-------asym load schema-------\n", "id: int32\n", "node: int32\n", "status: int8\n", @@ -292,7 +285,8 @@ { "data": { "text/plain": [ - "{'id': array([1, 2, 3]), 'u_rated': array([10500., 10500., 10500.])}" + "{'id': array([1, 2, 3], dtype=int32),\n", + " 'u_rated': array([10500., 10500., 10500.])}" ] }, "execution_count": 5, @@ -373,6 +367,87 @@ "outputs": [ { "data": { + "application/vnd.microsoft.datawrangler.viewer.v0+json": { + "columns": [ + { + "name": "index", + "rawType": "int64", + "type": "integer" + }, + { + "name": "id", + "rawType": "int32", + "type": "integer" + }, + { + "name": "energized", + "rawType": "int8", + "type": "integer" + }, + { + "name": "u_pu", + "rawType": "float64", + "type": "float" + }, + { + "name": "u", + "rawType": "float64", + "type": "float" + }, + { + "name": "u_angle", + "rawType": "float64", + "type": "float" + }, + { + "name": "p", + "rawType": "float64", + "type": "float" + }, + { + "name": "q", + "rawType": "float64", + "type": "float" + } + ], + "ref": "e0a1569d-3e2d-49e8-9326-80be633fd4da", + "rows": [ + [ + "0", + "1", + "1", + "1.000324825742982", + "10503.410670301311", + "-6.651843181518038e-05", + "338777.2462788448", + "-3299418.661306348" + ], + [ + "1", + "2", + "1", + "1.0028788641128945", + "10530.228073185392", + "-0.0029317915196012487", + "-1.0000002693184182", + "-0.5000000701801947" + ], + [ + "2", + "3", + "1", + "1.004112854674026", + "10543.184974077272", + "-0.004341587216862092", + "-1.9999998867105226", + "-1.4999998507078594" + ] + ], + "shape": { + "columns": 7, + "rows": 3 + } + }, "text/html": [ "
\n", "