Cython: Speed up Python and NumPy, Pythonize C, C++, and Fortran, SciPy2013 Tutorial, Part 1 of 4

preview_player
Показать описание
Presenter: Kurt Smith

Description
Cython is a flexible and multi-faceted tool that brings down the barrier between Python and other languages. With cython, you can add type information to your Python code to yield dramatic performance improvements. Cython also allows you to wrap C, C++ and Fortran libraries to work with Python and NumPy. It is used extensively in research environments and in end-user applications.

This hands-on tutorial will cover Cython from the ground up, and will include the newest Cython features, including typed memoryviews.

Target audience:

Developers, researchers, scientists, and engineers who use Python and NumPy and who routinely hit bottlenecks and need improved performance.

C / C++ / Fortran users who would like their existing code to work with Python.

Expected level of knowledge:

Intermediate and / or regular user of Python and NumPy. Have used Python's decorators, exceptions, and classes. Knowledge of NumPy arrays, array views, fancy indexing, and NumPy dtypes. Have programmed in at least one of C, C++, or Fortran.

Some familiarity with the Python or NumPy C-API a plus. Familiarity with memoryviews and buffers a plus. Familiarity with OpenMP a plus. Array-based inter-language programming between Python and C, C++, or Fortran a plus.

Required Packages

All necessary packages are available with an academic / full EPD installation, Anaconda, easy_install, or pip.

Users must have Cython v 0.16 or better for the course.

The tutorial material (slides, exercises & demos) will be available for download and on USB drives.

Documentation

Basic slide content is based on Enthought's Cython training slides. These slides will be reworked significantly for this tutorial. In particular, the NumPy buffer declarations will be taken out and replaced with the typed memoryview content listed in the outline. Other content (an IPython notebook with the start of the capstone project) is available as well:

Рекомендации по теме
Комментарии
Автор

I have watched this twice so far. Thanks very much :)

brucecropley
Автор

this is as awesome as python itself :)

bannaz
Автор

The presenter totally reminds me of Brian Austin Green.

Also, great presentation. Thanks!

SanjiroV
Автор

Very helpful tutorial. Can you upload the .ppt file somewhere? That would help much.

himanshumishra
Автор

please, repeat questions to microphone, so much knowledge is wasted :D

Youshisu
Автор

Unbelievable, his Fibonacci function IS WRONG! fib(3) is 2 and not 5, fib(5) is 5

brotherlui