Python: adapt to new numpy C API 1.7

Get rid of warnings bloat.