Parakeet is a runtime compiler for scientific computing in Python which uses type inference, data parallel array operators, and a lot of black magic to make your code run faster.

```
from parakeet import jit
@jit
def allpairs_dist(X,Y):
"""
Compute all pairs distances between rows of X and Y
For two 1000x1000 float64 inputs (on a 2.67ghz Xeon):
- Python runtime: 11.5 seconds
- Parakeet runtime: .013 seconds
"""
def dist(x,y):
return np.sum( (x-y)**2 )
return np.array([[dist(x,y) for y in Y] for x in X])
@jit
def smoothing(x, alpha):
"""
Exponential smoothing of a time series
For x = 10**6 floats
- Python runtime: 9.7 seconds
- Parakeet runtime: .009 seconds
"""
s = x.copy()
for i in xrange(1, len(x)):
s[i] = alpha * x[i] + (1 - alpha) * s[i-1]
return s
```

**Installing:**You can install Parakeet using pip by running

`pip install parakeet`

or you can download the source directly from github. Parakeet is written for Python 2.7 and requires NumPy 1.7+.
**Discussion Group:**If you have any questions, suggestions, or bug reports, please post them on the Parakeet Google Group.

**Limitations:**It's important to note that Parakeet is not a general purpose Python compiler (and trying to compile an arbitrary Python function will almost surely fail). The subset of Python supported by Parakeet is only useful for expressing numerical computations, primarily those done on dense NumPy arrays.

A non-exhaustive list of Parakeet's limitations and deviations from Python's semantics:

- The only supported data types are NumPy arrays, scalars, tuples, and slices.
- Whenever values of two different types might both reach a variable, they are upcast into a unifying type.
For example, a Python expression such as
`0.9`

would be translated by Parakeet into**if**b**else**False`0.9`

If you, however, attempted to switch between two values that can't be meaningfully unified, such as**if**b**else**0.0`0.3`

then Parakeet will raise an exception while attempting to compile your code.**if**flag**else**(1,2) - Parakeet internally represents programs using Structured SSA, which doesn't allow for catching exceptions, or
`break`

/`continue`

statements. Currently Parakeet doesn't even let you*raise*exceptions, but lifting that limit is on the long-term to-do list. - Parakeet only partially implements array broadcasting by inserting explicit Map operators based on the types of array arguments. This rewrite trick can't handle the expansion of unit dimensions (i.e. broadcasting
`8 x 1 x 6 x 1`

and`7 x 1 x 5`

). - When you call a Python function, Parakeet will also have to compile its contents. So all limitations listed here recursively apply up your entire call chain.
- The only methods, properties, and builtin/NumPy functions which you can use inside Parakeet are the small subset that have been explicitly reimplemented.

**More Info:**More details will about the design, implementation, and usage of Parakeet will soon be posted here. For now, the are a few resources online for learning more about Parakeet:

- Most recent talk from PyData NYC: Python on the GPU with Parakeet
- This blog post surveys the landscape of Python's various numerical JIT compilers and compares them with Parakeet.
- A (slightly outdated) overview of Parakeet's compilation pipeline..
- My presentation from PyData Boston compares Parakeet extensively with Numba.
- Our HotPar 2012 paper talks about a now abandoned GPU backend but still captures a lot of the other design aspects.