Skip to content

Instantly share code, notes, and snippets.

View joferkington's full-sized avatar
🏠
Working from home

Joe Kington joferkington

🏠
Working from home
View GitHub Profile
# -*- coding: utf-8 -*-
"""
Benchmark for spline interpolation of a 3D wind field, using the function map_coordinates.
The spline interpolation is about 46000 times slower than a linear interpolation.
It is also about 10000 times slower than an equivalent program, written in the programming
language Julia.
"""
import time
import numpy as np
from scipy import ndimage