jaberg/Theano — comment on commit 2290d24ef5bba180108696be7d83c7db92c534a1
File:  line 0
By delallea:

If .num of two dtypes is the same, then the two dtypes are ==. It is a stronger equality check. But the reverse is not true.
I think in this code we need to use .num, unless you want to modify as well the Theano C code that checks for correctness of types (which is currently based on .num). You can't just change the Python side as otherwise it will likely crash on some platforms (filter will believe the input is of correct type, but the C code won't like it).