This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bisect | |
class InterpTable(object): | |
''' | |
a look up table that linearly interperlates between values | |
''' | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import numpy.random as npr | |
from numpy.linalg import inv, cholesky | |
from scipy.stats import chi2 | |
def invwishartrand_prec(nu,phi): | |
return inv(wishartrand(nu,phi)) | |
def invwishartrand(nu, phi): | |
return inv(wishartrand(nu, inv(phi))) |