Stricter type checking for ndarray conversion

Fixes #276

As a side effect, correct a mis declaration in a test ;-)
Merge pull request #277 from serge-sans-paille/ndarray-type-check

Stricter type checking for ndarray conversion