Py3k fixes

Here's the PR that adds the missing import_array() call and removes the use of locals() inside list comprehensions. Now there is only one test failure remaining: the reverse_dict test. It appears that the order of elements in the reversed dict values is not deterministic.

Here are two runs of a [test script](http://pastebin.com/NfmYWSdP):
```bash
[~]$ python test.py
{1: ('a',), 2: ('a', 'b'), 3: ('b',)}
{1: ('a',), 2: ('a', 'b'), 3: ('b',)}
True
[~]$ python test.py
{1: ('a',), 2: ('a', 'b'), 3: ('b',)}
{1: ('a',), 2: ('b', 'a'), 3: ('b',)}
False
```

You can see that the values in the list for key 2 are reversed. The cause of the issue can be found here: http://docs.python.org/3/reference/datamodel.html#object.__hash__

In python 3.3, the version I'm running, hash randomization is enabled by default. This won't be a problem for python <= 3.2 and I'm not sure how much of an issue this is anyway as the meaning of the reversed dict seems to still be correct.