Additional .todense() -> .toarray() fixes
Fixing small formatting issue in doctest