Cython
A Guide for Python Programmers
Publisher: O'Reilly Media
Final Release Date: January 2015
Pages: 254

Build software that combines Python’s expressivity with the performance and control of C (and C++). It’s possible with Cython, the compiler and hybrid programming language used by foundational packages such as NumPy, and prominent in projects including Pandas, h5py, and scikits-learn. In this practical guide, you’ll learn how to use Cython to improve Python’s performance—up to 3000x— and to wrap C and C++ libraries in Python with ease.

Author Kurt Smith takes you through Cython’s capabilities, with sample code and in-depth practice exercises. If you’re just starting with Cython, or want to go deeper, you’ll learn how this language is an essential part of any performance-oriented Python programmer’s arsenal.

  • Use Cython’s static typing to speed up Python code
  • Gain hands-on experience using Cython features to boost your numeric-heavy Python
  • Create new types with Cython—and see how fast object-oriented programming in Python can be
  • Effectively organize Cython code into separate modules and packages without sacrificing performance
  • Use Cython to give Pythonic interfaces to C and C++ libraries
  • Optimize code with Cython’s runtime and compile-time profiling tools
  • Use Cython’s prange function to parallelize loops transparently with OpenMP
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyCython
 
5.0

(based on 1 review)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (0)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

Reviewed by 1 customer

Displaying review 1

Back to top

(11 of 12 customers found this review helpful)

 
5.0

Great way to get in to Cython!

By Danny

from San Diego, CA

About Me Developer

Verified Buyer

Pros

  • Accurate
  • Concise
  • Easy to understand
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Expert
    • Intermediate

    Comments about oreilly Cython:

    As I'm writing this, the book is still an early release, so I am still missing the last few chapters, but I have been looking forward to, and reading, each update as quickly as they come out.

    Python is a great language for math/science work, but as an interpreted language, it can be slow for some uses. Cython is a clever way to overcome this limitation without losing the benefits of Python. This book is a great guide to all aspects of Cython.

    You don't need to know any Cython when you start this book (I'd never seen it before), but it is NOT an introduction to Python. I would suggest this book for people who are fairly familiar with Python and want to push it beyond what it can do on its own, or who would like to interface Python with C/C++ code for various reasons.

    Beyond just an introduction, this book goes in to great depth on the various aspects of Cython and C/C++ interfacing using Cython. After reading and developing along with this book you should be able to do just about anything there is to do in Cython. I can't recommend it highly enough!

    Displaying review 1

    Back to top

     
    Buy 2 Get 1 Free Free Shipping Guarantee
    Buying Options
    Immediate Access - Go Digital what's this?
    Ebook: $25.99
    Formats:  ePub, Mobi, PDF
    Print & Ebook: $32.99
    Print: $29.99