Theano/Theano — pull request #1349 by jlowin (2013-04-24 01:36:51+00:00)
Title: Add basic support for NumPy boolean masks to be used with advanced indexing

This allows numpy boolean masks to be used to index theano variables, instead of being treated as arrays of '0' and '1' indices:

```python
t = tt.arange(9).reshape((3,3))
n = np.arange(9).reshape(3,3)
mask = n > 4
assert t[mask].eval() == n[mask]
assert t[mask[1]].eval() == n[mask[1]]
```

It does **not** let theano variables be used as masks, however (see discussion at https://groups.google.com/forum/?fromgroups=#!topic/theano-users/lROIMF-lqgg)