mirror of
https://github.com/ArthurDanjou/ArtStudies.git
synced 2026-01-23 15:51:55 +01:00
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:
@@ -902,7 +902,7 @@
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"def divisible_by_3_and13(n):\n",
|
||||
"def divisible_by_3_and13(n) -> None:\n",
|
||||
" if n % 3 == 0 and n % 13 == 0:\n",
|
||||
" print(n, \"is divisible by 3 and 13\")\n",
|
||||
" else:\n",
|
||||
|
||||
@@ -1084,7 +1084,7 @@
|
||||
],
|
||||
"source": [
|
||||
"# We remove the players for whom Salary is missing\n",
|
||||
"hitters.dropna(subset=[\"Salary\"], inplace=True)\n",
|
||||
"hitters = hitters.dropna(subset=[\"Salary\"])\n",
|
||||
"\n",
|
||||
"X = hitters.select_dtypes(include=int)\n",
|
||||
"Y = hitters[\"Salary\"]\n",
|
||||
|
||||
@@ -227,7 +227,8 @@
|
||||
"source": [
|
||||
"sms = pd.read_csv(\"data/spam.csv\", encoding=\"latin\")\n",
|
||||
"\n",
|
||||
"sms.head()"
|
||||
"sms.head()\n",
|
||||
"sms = "
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -243,7 +244,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"sms.rename(columns={\"v1\": \"Label\", \"v2\": \"Text\"}, inplace=True)"
|
||||
"sms.rename(columns={\"v1\": \"Label\", \"v2\": \"Text\"})"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user