Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
prm2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
prm2
Commits
55e49ae7
Commit
55e49ae7
authored
5 years ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
NumPy: Pár oprav a drobností navíc
parent
81787cc7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
02-numpy/02-numpy.tex
+7
-1
7 additions, 1 deletion
02-numpy/02-numpy.tex
02-numpy/notes
+0
-58
0 additions, 58 deletions
02-numpy/notes
with
7 additions
and
59 deletions
02-numpy/02-numpy.tex
+
7
−
1
View file @
55e49ae7
...
...
@@ -50,7 +50,7 @@ a.shape \cmt{(tvar pole)}
\py
{
%
a.size
\cmt
{
(celkový počet prvků)
}
}{
%
(2, 3)
6
}
\py
{
%
...
...
@@ -301,6 +301,9 @@ array([[0, 3],\\
~~~~~~~[6, 9]])
}
Pozor, řezy odkazují do původního pole!
Kopíruje se pomocí
{
\tt
copy()
}
.
\end{frame}
% ----------------------------------------------------------------------
...
...
@@ -377,6 +380,9 @@ b
array([ 0, 0, 0, 8, 0, 0, 12, 11, 9, 0])
}
Pozor,
{
\tt
x == y
}
také vrací booleovský vektor.
Pro porovnání celých vektorů se hodí
{
\tt
np.equal()
}
nebo
{
\tt
np.allclose()
}
.
\end{frame}
% ----------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
02-numpy/notes
deleted
100644 → 0
+
0
−
58
View file @
81787cc7
https://numpy.org/devdocs/reference/
np.array([], dtype=...)
np.zeros((3, 4))
np.ones((3, 4), dtype=...)
zeros_like
ones_like
reshape
arange
linspace
+ * @
a.sum(), min, max
a.sum(axis=0)
a.shape [pozor, není to funkce]
slices [pozor, nekopírují]
a.copy()
stretching
matplotlib.pyplot.annotate(s, xy, *args, **kwargs)
axis(\*args, \*\*kwargs)
bar
clf()
figlegend
fig = figure(figsize=...)
grid
hist ?
savefig
show
subplot
title
xlabel
ylabel
xlim
ylim
x/yscale
suptitle
text
tick_params
xkcd
random.seed
randrange
random
uniform
choice
choices(list, k=10)
shuffle(list)
sample(list, k=10)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment