It seems like you could make this a lot faster by doing integer comparisons rather than dtype comparisons.  For example, 

```python
if arrray1.desc.type_num == numpy.NPY_FLOAT16:
    ....
```

or 

```python
cdef int a1tnum = arrray1.desc.type_num
if a1tnum == numpy.NPY_FLOAT16:
    ....
```

This has the advantage that in recent versions of cython this whole block will be automatically converted into a big switch-case statement.  Therefore the C code that is generated would be much more analogous to the original version that you are replacing.  The Cython version might even be faster :).