I think these tests will work if f_mat and f_arr return matrices or arrays as it just checks whether the entries of the array are the same. It'd probably be a good idea to check whether the type of what f_arr and f_mat return are actually matrices and arrays. Maybe:

```python
isinstance(f_arr, type(sol_arr))
```