Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DIP2-cheatsheet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Tom Nellius
DIP2-cheatsheet
Compare revisions
03dc9aec8a757191bbdf2814b8b0af62c3a20646 to cef56460849ef1bd189800afde45655a62a725cf
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
tnellius/dip2-cheatsheet
Select target project
No results found
cef56460849ef1bd189800afde45655a62a725cf
Select Git revision
Branches
main
1 result
Swap
Target
tnellius/dip2-cheatsheet
Select target project
aaslan/dip2-cheatsheet
tnellius/dip2-cheatsheet
2 results
03dc9aec8a757191bbdf2814b8b0af62c3a20646
Select Git revision
Branches
main
1 result
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Explain difference between arange() and linspace()
· c1921d40
Tom Nellius
authored
2 years ago
c1921d40
Fixes
· cef56460
Tom Nellius
authored
2 years ago
cef56460
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DIP2-cheatsheet.md
+4
-4
4 additions, 4 deletions
DIP2-cheatsheet.md
with
4 additions
and
4 deletions
DIP2-cheatsheet.md
View file @
cef56460
...
...
@@ -31,8 +31,8 @@ ones_array = np.ones((rows, cols), dtype = np.uint64)
-
Other usefull stuff
```
python
np
.
arange
(
10
,
25
,
step
=
5
)
# evenly spaced values
np
.
linspace
(
0
,
2
,
num
=
9
,
dtype
)
# evenly spaced values
np
.
arange
(
10
,
25
,
step
=
5
)
# evenly spaced values
. Specify the stepsize
np
.
linspace
(
0
,
2
,
num
=
9
,
dtype
)
# evenly spaced values
. Specify the number of values
np
.
eye
(
2
,
dtype
)
# 2x2 identity matrix
np
.
random
.
random
((
2
,
2
))
# 2x2 array with random [0..1) values
np
.
random
.
randint
(
low
,
high
,
(
2
,
2
))
# 2x2 array with random integers from [low, high[ (w/o high!)
...
...
@@ -131,13 +131,13 @@ def log_transformation(img):
```
## Plotting
Importing
### Setup
```
python
from
matplotlib
import
pyplot
as
plt
# set up plot
...
plt
.
title
=
(
"
Title
"
)
plt
.
xlabel
=
(
"
X-axis
"
)
plt
.
xlabel
=
(
"
x_label
"
)
plt
.
ylabel
=
(
"
y_label
"
)
plt
.
show
()
```
...
...
This diff is collapsed.
Click to expand it.