Tag Archives: Cython

This shows how to use Cython to wrap C++


Click to read

This is a self-contained example of how to wrap C++ with Cython.

 

Scientific Computing with Hy: Linear Regressions


Click to Read

A tutorial adventure with Python 3, cytoolz, NumPy, and matplotlib

This tutorial was adapted from the Linear Regression tutorial for the Clojure scientific computing platform Incanter. It has been significantly modified to take advantage of the following, however:

  • Python 3
  • Hy – Clojure-Flavoured Python
  • cytoolz – a Cython implementation of the famous pytoolz suite
  • NumPy – a full-featured numeric library for Python
  • matplotlib – a Python mathematical plotting library, originally inspired by MATLAB

Okay, to be honest, we don’t really use cytoolz in the linear regression exercise; but we really wanted to 🙂 The opportunity just didn’t arise. Seriously, though, cytoolz some some pretty sweet stuff, and provides fast utility functions you may be missing if you’re coming (or returning!) to Python after living in the land of functional programming. In particular, it borrows heavily from the Clojure API (which is, quite bluntly, awesome).