Skip to content

Commit

Permalink
Raise value error if C != 0 and beta >= 1.
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanhobbs committed Sep 18, 2019
1 parent c5030cf commit 21738ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quantecon/lqcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ def __init__(self, Q, R, A, B, C=None, N=None, beta=1, T=None, Rf=None):
self.d = None
self.T = None

if (self.C != 0).any() and beta >= 1:
raise ValueError('beta must be strictly smaller than 1 if ' +
'T = None and C != 0.')

self.F = None

def __repr__(self):
Expand Down

0 comments on commit 21738ad

Please sign in to comment.