Skip to content

Instantly share code, notes, and snippets.

@vlad17
Created November 22, 2016 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vlad17/93ec00d78a7817a4faae94b865764499 to your computer and use it in GitHub Desktop.
Save vlad17/93ec00d78a7817a4faae94b865764499 to your computer and use it in GitHub Desktop.
vlad@vlad-T460:~$ python
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy.fftpack import dct
>>> import numpy as np
>>> for n in range(1, 5):
... print(dct(np.identity(n), norm='ortho'))
...
[[ 1.]]
[[ 0.70710678 0.70710678]
[ 0.70710678 -0.70710678]]
[[ 0.57735027 0.70710678 0.40824829]
[ 0.57735027 0. -0.81649658]
[ 0.57735027 -0.70710678 0.40824829]]
[[ 0.5 0.65328148 0.5 0.27059805]
[ 0.5 0.27059805 -0.5 -0.65328148]
[ 0.5 -0.27059805 -0.5 0.65328148]
[ 0.5 -0.65328148 0.5 -0.27059805]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment