|
131 | 131 | }, |
132 | 132 | { |
133 | 133 | "cell_type": "code", |
134 | | - "execution_count": null, |
| 134 | + "execution_count": 1, |
135 | 135 | "id": "f1548006", |
136 | 136 | "metadata": { |
137 | 137 | "execution": { |
|
141 | 141 | "shell.execute_reply": "2026-02-10T23:04:29.351597Z" |
142 | 142 | } |
143 | 143 | }, |
144 | | - "outputs": [], |
| 144 | + "outputs": [ |
| 145 | + { |
| 146 | + "name": "stdout", |
| 147 | + "output_type": "stream", |
| 148 | + "text": [ |
| 149 | + "✓ .NET runtime loaded successfully\n" |
| 150 | + ] |
| 151 | + } |
| 152 | + ], |
145 | 153 | "source": [ |
146 | 154 | "import pythonnet\n", |
147 | 155 | "\n", |
|
168 | 176 | }, |
169 | 177 | { |
170 | 178 | "cell_type": "code", |
171 | | - "execution_count": null, |
| 179 | + "execution_count": 2, |
172 | 180 | "id": "65dc539a", |
173 | 181 | "metadata": { |
174 | 182 | "execution": { |
|
178 | 186 | "shell.execute_reply": "2026-02-10T23:04:29.884975Z" |
179 | 187 | } |
180 | 188 | }, |
181 | | - "outputs": [], |
| 189 | + "outputs": [ |
| 190 | + { |
| 191 | + "name": "stdout", |
| 192 | + "output_type": "stream", |
| 193 | + "text": [ |
| 194 | + "✓ Loaded Numerics from: C:\\GIT\\Numerics\\Numerics\\bin\\Debug\\net8.0\\Numerics.dll\n" |
| 195 | + ] |
| 196 | + } |
| 197 | + ], |
182 | 198 | "source": [ |
183 | 199 | "import clr \n", |
184 | 200 | "from pathlib import Path \n", |
|
209 | 225 | }, |
210 | 226 | { |
211 | 227 | "cell_type": "code", |
212 | | - "execution_count": null, |
| 228 | + "execution_count": 3, |
213 | 229 | "id": "b3a59cb5", |
214 | 230 | "metadata": { |
215 | 231 | "execution": { |
|
219 | 235 | "shell.execute_reply": "2026-02-10T23:04:30.373706Z" |
220 | 236 | } |
221 | 237 | }, |
222 | | - "outputs": [], |
| 238 | + "outputs": [ |
| 239 | + { |
| 240 | + "name": "stdout", |
| 241 | + "output_type": "stream", |
| 242 | + "text": [ |
| 243 | + "✓ Numerics namespaces imported successfully\n" |
| 244 | + ] |
| 245 | + } |
| 246 | + ], |
223 | 247 | "source": [ |
224 | 248 | "# Import the most commonly used namespaces\n", |
225 | 249 | "from Numerics.Distributions import Normal\n", |
|
240 | 264 | }, |
241 | 265 | { |
242 | 266 | "cell_type": "code", |
243 | | - "execution_count": null, |
| 267 | + "execution_count": 4, |
244 | 268 | "id": "f6b4f2fd", |
245 | 269 | "metadata": { |
246 | 270 | "execution": { |
|
250 | 274 | "shell.execute_reply": "2026-02-10T23:04:30.386939Z" |
251 | 275 | } |
252 | 276 | }, |
253 | | - "outputs": [], |
| 277 | + "outputs": [ |
| 278 | + { |
| 279 | + "name": "stdout", |
| 280 | + "output_type": "stream", |
| 281 | + "text": [ |
| 282 | + "Mean: 100.0\n", |
| 283 | + "Standard Deviation: 15.0\n", |
| 284 | + "Variance: 225.0\n", |
| 285 | + "Skewness: 0.0\n", |
| 286 | + "Kurtosis: 3.0\n", |
| 287 | + "\n", |
| 288 | + "Small Sanity Check\n", |
| 289 | + "0.5 ~= 0.5 ✓\n" |
| 290 | + ] |
| 291 | + } |
| 292 | + ], |
254 | 293 | "source": [ |
255 | 294 | "# Create a Normal Distribution with mean=100, sd=15\n", |
256 | 295 | "dist = Normal(100,15)\n", |
|
277 | 316 | }, |
278 | 317 | { |
279 | 318 | "cell_type": "code", |
280 | | - "execution_count": null, |
| 319 | + "execution_count": 5, |
281 | 320 | "id": "d51dfbec", |
282 | 321 | "metadata": { |
283 | 322 | "execution": { |
|
287 | 326 | "shell.execute_reply": "2026-02-10T23:04:30.395271Z" |
288 | 327 | } |
289 | 328 | }, |
290 | | - "outputs": [], |
| 329 | + "outputs": [ |
| 330 | + { |
| 331 | + "name": "stdout", |
| 332 | + "output_type": "stream", |
| 333 | + "text": [ |
| 334 | + "Python list: [10.5, 20.3, 15.7, 18.9, 22.1]\n", |
| 335 | + ".NET array length: 5\n", |
| 336 | + "Converted back: [10.5, 20.3, 15.7, 18.9, 22.1]\n" |
| 337 | + ] |
| 338 | + } |
| 339 | + ], |
291 | 340 | "source": [ |
292 | 341 | "# Python list to .NET Array[Double]\n", |
293 | 342 | "python_data = [10.5, 20.3, 15.7, 18.9, 22.1]\n", |
|
315 | 364 | }, |
316 | 365 | { |
317 | 366 | "cell_type": "code", |
318 | | - "execution_count": null, |
| 367 | + "execution_count": 6, |
319 | 368 | "id": "3c61d5ad", |
320 | 369 | "metadata": { |
321 | 370 | "execution": { |
|
325 | 374 | "shell.execute_reply": "2026-02-10T23:04:30.735936Z" |
326 | 375 | } |
327 | 376 | }, |
328 | | - "outputs": [], |
| 377 | + "outputs": [ |
| 378 | + { |
| 379 | + "name": "stdout", |
| 380 | + "output_type": "stream", |
| 381 | + "text": [ |
| 382 | + "✓ Log-likelihood function defined\n" |
| 383 | + ] |
| 384 | + } |
| 385 | + ], |
329 | 386 | "source": [ |
330 | 387 | "# Example data for log-likelihood\n", |
331 | 388 | "data = Array[Double]([12.0, 15.5, 14.2, 16.8, 13.9])\n", |
|
351 | 408 | }, |
352 | 409 | { |
353 | 410 | "cell_type": "code", |
354 | | - "execution_count": null, |
| 411 | + "execution_count": 7, |
355 | 412 | "id": "b2c575cc", |
356 | 413 | "metadata": { |
357 | 414 | "execution": { |
|
361 | 418 | "shell.execute_reply": "2026-02-10T23:04:30.752184Z" |
362 | 419 | } |
363 | 420 | }, |
364 | | - "outputs": [], |
| 421 | + "outputs": [ |
| 422 | + { |
| 423 | + "name": "stdout", |
| 424 | + "output_type": "stream", |
| 425 | + "text": [ |
| 426 | + "✓ Loaded Test_Numerics from: C:\\GIT\\Numerics\\Test_Numerics\\bin\\Debug\\net8.0\\Test_Numerics.dll\n", |
| 427 | + "✓ f(x) = x^3 defined\n" |
| 428 | + ] |
| 429 | + } |
| 430 | + ], |
365 | 431 | "source": [ |
366 | 432 | "# MODIFY this path to point to your Test_Numerics.dll\n", |
367 | 433 | "test_dll_path = Path(r\"C:\\GIT\\Numerics\\Test_Numerics\\bin\\Debug\\net8.0\\Test_Numerics.dll\")\n", |
|
0 commit comments