Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
222f800a
Commit
222f800a
authored
Jul 07, 2010
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doc/transforms.py: whrandom is deprecated since python 2.1
Only import needed functions
parent
edeb8f7b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
doc/transforms.py
doc/transforms.py
+5
-11
No files found.
doc/transforms.py
View file @
222f800a
...
...
@@ -3,16 +3,12 @@
# reference about classical DCT and DFT algorithms.
import
math
import
cmath
pi
=
math
.
pi
sin
=
math
.
sin
cos
=
math
.
cos
sqrt
=
math
.
sqrt
from
random
import
random
from
math
import
pi
,
sin
,
cos
,
sqrt
from
cmath
import
exp
def
exp_j
(
alpha
):
return
cmath
.
exp
(
alpha
*
1j
)
return
exp
(
alpha
*
1j
)
def
conjugate
(
c
):
c
=
c
+
0j
...
...
@@ -1067,15 +1063,13 @@ def dump (vector):
str
=
str
+
realstr
#+ imagstr
return
"[%s]"
%
str
import
whrandom
def
test
(
N
):
input
=
vector
(
N
)
output
=
vector
(
N
)
verify
=
vector
(
N
)
for
i
in
range
(
N
):
input
[
i
]
=
whrandom
.
random
()
+
1j
*
whrandom
.
random
()
input
[
i
]
=
random
()
+
1j
*
random
()
unscaled_DFT
(
N
,
input
,
output
)
unscaled_DFT
(
N
,
input
,
verify
)
...
...
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