Skip to content

FIX: Raise correct error when A is not square in LinearStateSpace#475

Merged
oyamad merged 1 commit intoQuantEcon:masterfrom
QBatista:fix_error_lss
Mar 15, 2019
Merged

FIX: Raise correct error when A is not square in LinearStateSpace#475
oyamad merged 1 commit intoQuantEcon:masterfrom
QBatista:fix_error_lss

Conversation

@QBatista
Copy link
Copy Markdown
Member

Currently:

A = np.zeros((1, 2))
C = np.zeros((1, 1))
G = np.zeros((1, 1))

qe.LinearStateSpace(A, C, G)

raises

TypeError: not all arguments converted during string formatting

This PR fixes lss.py so that the correct error is raised when A is not a square matrix.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.02%) to 93.91% when pulling fc629de on QBatista:fix_error_lss into 1e757ec on QuantEcon:master.

Copy link
Copy Markdown
Member

@oyamad oyamad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@oyamad oyamad merged commit 2402749 into QuantEcon:master Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants