Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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