Matthew Dennison

Random notes

Some random bits and pieces to do with coding, algorithms, and whatever else takes my fancy...

f2py: calling Fortran subroutines from Python

  • f2py is a great little feature of numpy, that compiles Fortran subroutines such that they can be imported and used in Python.

  • Aliasing functions in Fortran

  • Procedure pointers are a feature in Fortran that allows one to alias function or subroutine names.

  • Vectorizing processes in Python

  • Vectorizing in Python can speed things up a lot, but importing Fortran functions can be even faster.