Add `test_matrices.py`

Forgot to add `test_matrices.py` in previous commit