Skip to content

Instantly share code, notes, and snippets.

View mforbes's full-sized avatar

Michael McNeil Forbes mforbes

  • Washington State University
  • Pullman
View GitHub Profile
@mforbes
mforbes / Introduction to Waves.ipynb
Last active April 6, 2016 22:37
Introduction to Waves
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mforbes
mforbes / Coulomb Interaction.ipynb
Last active August 29, 2015 13:59
Demonstration of various options for removing Coulomb image charges from a periodic lattice. View: http://nbviewer.ipython.org/gist/10911745
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mforbes
mforbes / typecheck_eg.i
Created July 1, 2012 19:29
SWIG example of multiple typechecks with different pecedences.
%typemap(typecheck, precedence=5000)(MyComplex) {
$1 = QuicklyCheckIfReallyIsMyComplex($input);
}
%typemap(typecheck, precedence=5500)(MyDouble) {
$1 = QuicklyCheckIfReallyIsMyDouble($input);
}
%typemap(typecheck, precedence=6000)(MyDouble) {
$1 = LongCheckToSeeIfCanBeConvertedToADouble($input);
}
%typemap(typecheck, precedence=6500)(MyComplex) {