Skip to content

Instantly share code, notes, and snippets.

@cc7768
cc7768 / test.py
Created August 21, 2014 17:43
Example of numba loops
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 August 29, 2015 14:05
An Ipython Notebook about the Nelder Mead minimization algorithm.
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:fee0863747d7685991108f84eaecd97166e8946b885c72b24a3040180a0142ae"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@cc7768
cc7768 / Bisection.py
Last active August 29, 2015 14:04
Testing numba for optimization.
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)