Skip to content

Instantly share code, notes, and snippets.

@richinex
richinex / jax_optim_adam.ipynb
Created October 31, 2022 10:19
jax_optim_adam.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@richinex
richinex / julia_optim_adam.ipynb
Last active November 5, 2022 10:01
julia_optim_adam.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@richinex
richinex / julia_optim.ipynb
Last active October 25, 2022 09:13
julia_optim.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@richinex
richinex / jax_optim.ipynb
Created October 23, 2022 19:12
jax_optim.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@richinex
richinex / TDMAsolver.py
Created November 10, 2021 07:17 — forked from TheoChristiaanse/TDMAsolver.py
Tridiagonal Matrix Algorithm solver in Python. I've modified the code from cbellei so, it works with python 3.0+ and implemented the use of jit to increase the speed.
import numpy as np
from numba import jit, f8
## Tri Diagonal Matrix Algorithm(a.k.a Thomas algorithm) solver
@jit(f8[:] (f8[:],f8[:],f8[:],f8[:] ))
def TDMAsolver(a, b, c, d):
'''
TDMA solver, a b c d can be NumPy array type or Python list type.
refer to http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm
and to http://www.cfd-online.com/Wiki/Tridiagonal_matrix_algorithm_-_TDMA_(Thomas_algorithm)