diff --git a/README.md b/README.md index 3df7db5..3047cbf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# Numerical Python: A Practical Techniques Approach for Industry +# Numerical Python: Scientific Computing and Data Science Applications with NumPy, SciPy and Matplotlib Robert Johansson -This repository contains source code listings in the form of IPython notebooks for the book Numerical Python: A Practical Techniques Approach for Industry (ISBN 978-1-484205-54-9). For the official code listings download page, see http://www.apress.com/9781484205549. +This repository contains source code listings in the form of IPython notebooks for the book [Numerical Python - Scientific Computing and Data Science Applications with Numpy, SciPy and Matplotlib](https://link.springer.com/book/10.1007/979-8-8688-0413-7) (ISBN 979-8-8688-0412-0), 3rd edition. \ No newline at end of file diff --git a/ch01-Markdown.ipynb b/ch01-Markdown.ipynb index dc1050a..6a724c0 100644 --- a/ch01-Markdown.ipynb +++ b/ch01-Markdown.ipynb @@ -13,7 +13,7 @@ "source": [ "Robert Johansson\n", "\n", - "Source code listings for [Numerical Python - Scientific Computing and Data Science Applications with Numpy, SciPy and Matplotlib](https://www.apress.com/us/book/9781484242452) (ISBN 978-1-484242-45-2)." + "Source code listings for [Numerical Python - Scientific Computing and Data Science Applications with Numpy, SciPy and Matplotlib](https://link.springer.com/book/10.1007/979-8-8688-0413-7) (ISBN 979-8-8688-0412-0)." ] }, { @@ -311,24 +311,40 @@ "outputs": [ { "data": { + "application/json": { + "Software versions": [ + { + "module": "Python", + "version": "3.10.12 64bit [Clang 14.0.6 ]" + }, + { + "module": "IPython", + "version": "8.12.0" + }, + { + "module": "OS", + "version": "macOS 10.15.7 x86_64 i386 64bit" + } + ] + }, "text/html": [ - "
| Software | Version |
|---|---|
| Python | 3.6.6 64bit [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] |
| IPython | 6.4.0 |
| OS | Darwin 17.3.0 x86_64 i386 64bit |
| Thu Sep 27 22:36:35 2018 JST | |
| Software | Version |
|---|---|
| Python | 3.10.12 64bit [Clang 14.0.6 ] |
| IPython | 8.12.0 |
| OS | macOS 10.15.7 x86\\_64 i386 64bit |
| Sat Nov 02 18:02:00 2024 JST | |
Robert Johansson
-Source code listings for Numerical Python - A Practical Techniques Approach for Industry (ISBN 978-1-484205-54-9).
-The source code listings can be downloaded from http://www.apress.com/9781484205549
+Source code listings for Numerical Python - Scientific Computing and Data Science Applications with Numpy, SciPy and Matplotlib (ISBN 979-8-8688-0412-0).
%%writefile hello.py
-print("Hello from Python!")
+%%writefile hello.py
+print("Hello from Python!")
!python hello.py
+
+In [2]:
+
+
+!python hello.py
+
+
!python --version
+
+In [3]:
+
+
+!python --version
+
+
(restart the kernel for the same output and cell numbers)
+3 * 3
In[1]
Out[1]
In
Out
1+2
1+2;
x = 1
x = 2; x
import os
# try os.w<TAB>
import math
math.cos?
!touch file1.py file2.py file3.py
+!touch file1.py file2.py file3.py
!ls file*
+
+In [15]:
+
+
+!ls file*
+
+
files = !ls file*
+
+In [16]:
+
+
+files = !ls file*
+
len(files)
files
file = "file1.py"
+
+In [19]:
+
+
+file = "file1.py"
+
!ls -l $file
+
+In [20]:
+
+
+!ls -l $file
+
+
%%writefile fib.py
+%%writefile fib.py
-def fib(N):
- """
- Return a list of the first N Fibonacci numbers.
- """
- f0, f1 = 0, 1
- f = [1] * N
- for n in range(1, N):
- f[n] = f0 + f1
- f0, f1 = f1, f[n]
+def fib(N):
+ """
+ Return a list of the first N Fibonacci numbers.
+ """
+ f0, f1 = 0, 1
+ f = [1] * N
+ for n in range(1, N):
+ f[n] = f0 + f1
+ f0, f1 = f1, f[n]
- return f
+ return f
-print(fib(10))
+print(fib(10))
!python fib.py
+
+In [22]:
+
+
+!python fib.py
+
%run fib.py
fib(6)