Skip to content

Instantly share code, notes, and snippets.

@cc7768
cc7768 / test.py
Created Aug 21, 2014
Example of numba loops
View test.py
import numpy as np
from numba import jit
def f_original(x, y):
n = x.size
m = y.size
z = np.empty((n, m))
@cc7768
cc7768 / NelderMeadNB
Last active Aug 29, 2015
An Ipython Notebook about the Nelder Mead minimization algorithm.
View NelderMeadNB
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:fee0863747d7685991108f84eaecd97166e8946b885c72b24a3040180a0142ae"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
@cc7768
cc7768 / Bisection.py
Last active Aug 29, 2015
Testing numba for optimization.
View Bisection.py
import numpy as np
from scipy.optimize import bisect
from numba import f8, jit, njit
def min_me(x):
return x**4 - 2*x**2 - x - 3.
num_min_me = jit(min_me)