Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
python-math
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Thibaut.Lunet
python-math
Commits
b2fb284c
Commit
b2fb284c
authored
Apr 10, 2019
by
Thibaut.Lunet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TL: modification on second seminar presentation
parent
c5c0aaa3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletion
+41
-1
presentations/2019-04-01/python.pdf
presentations/2019-04-01/python.pdf
+0
-0
presentations/2019-04-01/python.tex
presentations/2019-04-01/python.tex
+41
-1
No files found.
presentations/2019-04-01/python.pdf
View file @
b2fb284c
No preview for this file type
presentations/2019-04-01/python.tex
View file @
b2fb284c
...
...
@@ -212,7 +212,7 @@ r = bool(5) # Alternative definition, False only for 0 or None
}
\begin{frame}
{
Basic variables types and operations
}
\pythonCode\vspace*
{
-20pt
}
$
\rightarrow
$
find how to
compute the floor of any numb
er
$
\rightarrow
$
find how to
round any number to the closest integ
er
\end{frame}
\defverbatim
[colored]
\pythonCode
{
...
...
@@ -459,6 +459,7 @@ Optimized python library for matrix manipulation
\vspace*
{
-5pt
}
\pythonCode
\end{frame}
\defverbatim
[colored]
\pythonCode
{
\begin{pythoncode}
from scipy import optimize as spo
...
...
@@ -482,7 +483,46 @@ Scipy add a collection of algorithms adapted to numpy arrays, e.g :
$
\rightarrow
$
how to compute the eigenvalues of a matrix ?
\\
$
\rightarrow
$
how to define a sparse circulant matrix ?
\\
$
\rightarrow
$
how to compute a curve fitting from given data ?
\end{frame}
\defverbatim
[colored]
\pythonCode
{
\begin{pythoncode}
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-1, 1, num=200)
plt.plot(x, np.exp(x), '--', label='Initial data
$
e
^{
x
}$
')
x
_
mod = x[::20]
y
_
mod = np.exp(x
_
mod) + 0.1*np.random.randn(x
_
mod.size)
plt.plot(x
_
mod, y
_
mod, 'o', label='Measured data')
plt.xlabel('
$
x
$
')
plt.ylabel('Data')
plt.grid()
plt.legend()
\end{pythoncode}
}
\begin{frame}
{
Plotting data with Matplotlib
}
Library for data representation similar to Matlab or equivalents
\vspace*
{
-5pt
}
\pythonCode\vspace*
{
-20pt
}
$
\rightarrow
$
how to plot data with symbol and lines together ?
\\
$
\rightarrow
$
how to quickly plot the values of a matrix with colorbar ?
\end{frame}
\defverbatim
[colored]
\pythonCode
{
\begin{pythoncode}
from scipy.optimize import curve
_
fit
...
\end{pythoncode}
}
\begin{frame}
{
Exercise : curve fitting
}
Perform a curve fitting of the previous measured data, with an objective function of the form
$
\exp
(
\alpha
x
)
$
\pause
\vspace*
{
-5pt
}
\pythonCode
\end{frame}
\begin{frame}
{
Introduction to object oriented programming
}
Incoming ...
\end{frame}
\end{document}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment