Refactor error messages and function signatures across multiple notebooks for clarity and consistency

- Updated error messages in Gauss method and numerical methods to use variables for better readability.
- Added return type hints to function signatures in various notebooks to improve code documentation.
- Corrected minor grammatical issues in docstrings for better clarity.
- Adjusted print statements and list concatenations for improved output formatting.
- Enhanced plotting functions to ensure consistent figure handling.
This commit is contained in:
2025-12-24 22:26:59 +01:00
parent 1141382c81
commit bcac5764f6
19 changed files with 60 additions and 58 deletions

View File

@@ -177,7 +177,7 @@
"import _pickle as pickle\n",
"\n",
"train_size = 0.8\n",
"train_index = int(round(len(sequences) * train_size))\n",
"train_index = round(len(sequences) * train_size)\n",
"X_train = X[:train_index, :, :]\n",
"y_train = y[:train_index, :]\n",
"\n",
@@ -471,7 +471,7 @@
},
"outputs": [],
"source": [
"def save_model(model, name):\n",
"def save_model(model, name) -> None:\n",
" \"\"\"Save a Keras model to JSON and H5 files.\"\"\"\n",
" model_json = model.to_json()\n",
" with open(name + \".json\", \"w\") as json_file:\n",