use isinstance to raise TypeError if the type is wrong
raise TypeError too, if it doesn't quick like an ndarray
tentative fix for py3 special case, please check on py3
fix checking for negative items
Merge pull request #39 from esc/correct_exception_types

use isinstance and TypeError