Cautious numpy support.

Need to write lots of tests for this, because there are just too many corner cases.