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 | |
from numba import * | |
f8_array_ty = f8[:] | |
@jit | |
class fir (object): | |
@void(f8[:]) | |
def __init__ (self, coef): | |
self.coef = coef |
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 | |
from numba import * | |
f8_array_ty = f8[:] | |
@jit | |
class fir (object): | |
@void(f8[:]) | |
def __init__ (self, coef): | |
self.coef = coef |
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 | |
from numba import * | |
from numba.vectorize import vectorize | |
from math import exp, log1p | |
@vectorize([f8(f8,f8)]) | |
def log_exp_sum2 (a, b): | |
if a >= b: | |
return a + log1p (exp (-(a-b))) |
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 | |
from numba import * | |
f8_array_ty = f8[:] | |
@autojit | |
class fir (object): | |
## @void(f8[:]) | |
def __init__ (self, coef): | |
self.coef = coef |
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 | |
class extensible_array (object): | |
def __init__(self, ndims=0, dtype=int, init=None): | |
if init is not None: | |
self.arr = init | |
else: | |
self.arr = np.zeros ([0]*ndims, dtype=dtype) | |
def __getitem__ (self, indices): |
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
Python 3.5.1 |Anaconda custom (64-bit)| (default, Dec 7 2015, 11:16:01) | |
Type "copyright", "credits" or "license" for more information. | |
IPython 4.2.0 -- An enhanced Interactive Python. | |
? -> Introduction and overview of IPython's features. | |
%quickref -> Quick reference. | |
help -> Python's own help system. | |
object? -> Details about 'object', use 'object??' for extra details. | |
In [1]: python.el: native completion setup loaded |
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
\makeatletter | |
\def\input@path{{/home/nbecker/interference/}} | |
\makeatother | |
\documentclass[english]{beamer} | |
\usepackage{amsmath} | |
\usepackage{fontspec} | |
\usepackage{unicode-math} | |
\setcounter{secnumdepth}{3} | |
\setcounter{tocdepth}{3} |
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
type var{T,S} | |
sum::T | |
sumsqr::S | |
nobjs::Int64 | |
var() = new(0,0,0) | |
end | |
var_cmplx(T=Float64) = var{Complex{T},T}() | |
var_scalar(T=Float64) = var{T,T}() |
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
#include <numpy/arrayobject.h> | |
#include "pybind11/pybind11.h" | |
#include "pybind11/complex.h" // needed to return std::complex | |
#include "ndarray/pybind11.h" | |
#include <cmath> | |
#include <complex> | |
namespace nd=ndarray; | |
namespace py = pybind11; |
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
#include <numpy/arrayobject.h> | |
#include "pybind11/pybind11.h" | |
#include "pybind11/stl.h" | |
#include "xtensor/xarray.hpp" | |
#include "xtensor/xtensor.hpp" | |
#include "xtensor/xcontainer.hpp" | |
#include "xtensor/xbroadcast.hpp" | |
//#include "xtensor/xbuilder.hpp" | |
#include "xtensor/xview.hpp" | |
#include "xtensor/xeval.hpp" |
OlderNewer