Py 3.x fix
Add matrix input tests