# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import numpy as np
from scipy.fftpack import dctn

example = np.zeros((8, 8))

dctn(example - 128, norm='ortho').round()

dctn(example + 127, norm='ortho')

example[::2] = 255
example

dctn(example - 128, norm='ortho').round()

example = np.zeros((8, 8))
example[:4] = 255
example

dctn(example - 128, norm='ortho').round()



StarcoderdataJupyterScriptsDedupFiltered