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
 
4.5

(based on 2 reviews)

Ratings Distribution

  • 5 Stars

     

    (1)

  • 4 Stars

     

    (1)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

Reviewed by 2 customers

Sort by

Displaying reviews 1-2

Back to top

 
4.0

Good guide on the topic

By colin

from london

About Me Developer

Pros

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

Cons

    Best Uses

    • Intermediate
    • Novice
    • Student

    Comments about oreilly Cython:

    There are 4 guides on the official website. Unfortunately all of them are quite old: The contents are overlapped and not well structured. Outdated info scatters everywhere.

    Finally here comes this book. It offers a clear and well organized introduction on Cython, so you don't have to crawl through the 4 guides on the website back and forth.

    It suits most people, from beginner to intermediate.

    The only drawback is that the book doesn't contain any advanced material, i.e. how internally Cython compiles the code, what code does it generate underneath at each scenario. Maybe the author doesn't want to cover these implementation details as the book is rather a guide than a in-depth reference.

    Sadly there isn't any tutorial covering such topic at all in the market.

    (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 reviews 1-2

      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