Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
** Author: ** Alex Liberzon http://github.com/alexlib
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| def reconstruct_with_sinc(ts,fd,t): | |
| n, = ts.shape | |
| dt = ts[1] - ts[0] | |
| fr = [] | |
| for k,ti in enumerate(t): | |
| # for each time point | |
| sumf = 0.0 | |
| for i in range(n): |
| function [v] = loadvec_Insight(dirname) | |
| %{ | |
| Copyright (c) 2011, Alex Liberzon (alex-dot-liberzon-at-gmail-dot-com) | |
| All rights reserved. | |
| Redistribution and use in source and binary forms, with or without | |
| modification, are permitted provided that the following conditions are met: | |
| * Redistributions of source code must retain the above copyright | |
| notice, this list of conditions and the following disclaimer. | |
| * Redistributions in binary form must reproduce the above copyright |
The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.
The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy