The numpy package is at the core of scientific computing
in python. It is the go-to tool for implementing any numerically intensive
tasks. The popular pandas package is
also built on top of the capabilities of numpy.

Read More

# Blog

- Speed-up numpy with Intel's Math Kernel Library (MKL)
- Matplotlib graphics for the metropolis beamer theme
- Matplotlib boxplots with custom percentiles
- Speed up Python code with Numpy: an example case
- Plot circular data with matplotlib
- How to customise your bash prompt
- 3 useful Python decorators
- Plot publication-quality figures with matplotlib and LaTeX

Beamer is a great tool to make presentations with, and is *indispensable* to those who need to typeset mathematics within their slides. Beamer is actually just a LaTeX document class, so its syntax and setup is familiar to those who have experience working with TeX and friends.

Read More

This post was inspired by a question I answered on stack overflow. In the question a user asked if it was possible to make a boxplot with box boundaries at arbitrary percentiles, using matplotlib. Of course, with matplotlib anything is possible and so I set to work…

Read More

In this post I shall introduce the definition of the effective sample size (ESS) as given by Gelman *et. al* in their book Bayesian Data Analysis 3. Afterwards I shall review PyMC’s computation of the ESS. PyMC’s implementation provides a perfect example case of how we can speed up code with Numpy. I show how we can do so and compute the ESS over *500x faster* than PyMC. I’ve posted the full example code and speed comparison used in this post here.

Read More

Circular data arises very naturally in many different situations. Meterologists regularly encounter directional data when considering wind directions, ecologists may come across angular data when looking at the directions of motion of animals, and we all come into contact with at least one type of circular data every day: the time.

Read More

Your command line is a very powerful tool, and once you’ve spent a fair amount of time working from it you may wish to customise the way it looks and behaves. Fortunately, it’s very easy to do so using so-called dotfiles. At the most basic level you may have encountered these before, most likely in the form of the `.bashrc`

file.

Read More

It was around a year ago that I first came across the concept of a decorator in Python. I was immediately intrigued: the use of a function of function appealed to me as a mathematician. However, other than the “time” example often used to advocate the use of decorators, I didn’t immediately find much use for them.

Read More

Figures are an incredibly important aspect of effectively communicating research and ideas. Poor quality figures are difficult to read and interpret. At their worse, bad figures are simply misleading. Good quality plots, however, blend seamlessly with a document, they are readable, clear, concise and aesthetically pleasing.

Read More