Skip to content

Instantly share code, notes, and snippets.

View Sibgatulin's full-sized avatar

Renat Sibgatulin Sibgatulin

View GitHub Profile
@Sibgatulin
Sibgatulin / particle_vectorisation_with_jax.py
Last active February 19, 2025 10:28
Little snippet exploring array vectorisation options with (jax.)numpy
from functools import partial
import jax.numpy as jnp
import matplotlib.pyplot as plt
NVOX = 3
t = jnp.linspace(0, 1, 100)
@Sibgatulin
Sibgatulin / linear_meets_exponential.py
Created August 7, 2024 10:53
linear_meets_exponential.py
import numpy as np
import matplotlib.pyplot as plt
E = np.exp(1)
def f_lin(x, alpha):
return alpha * x
@Sibgatulin
Sibgatulin / patching_generic_solver.ipynb
Created April 11, 2023 11:22
Little notebook illustrating an issue with `GenericSubproblemSolver` in scico.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Sibgatulin
Sibgatulin / sporco_tvl2deconv_mwe.py
Created April 23, 2019 22:58
MWE illustrating an issue with sporco.admm.tvl2.TVL2Deconv shifting the solution by half of the kernel size
import numpy as np
import matplotlib.pyplot as plt
from scipy import signal, ndimage
from sporco.admm import tvl1, tvl2
# Sample image
x = np.linspace(-1,1,128)
r1 = .4
r2 = .9