Commit a04d5210 authored by Steven Cordwell's avatar Steven Cordwell
Browse files

more tests for new ability to accept lists and tuples to check()

parent 940c3c72
......@@ -85,6 +85,20 @@ def test_check_P_square_stochastic_nonnegative_list_array():
P.append(eye(STATES))
assert (check(P, R) == None)
def test_check_P_square_stochastic_nonnegative_list_matrix():
P = []
R = rand(STATES, ACTIONS)
for a in xrange(ACTIONS):
P.append(matrix(eye(STATES)))
assert (check(P, R) == None)
def test_check_P_square_stochastic_nonnegative_list_sparse():
P = []
R = rand(STATES, ACTIONS)
for a in xrange(ACTIONS):
P.append(speye(STATES, STATES).tocsr())
assert (check(P, R) == None)
# check: R - square stochastic and non-negative sparse
def test_check_R_square_stochastic_nonnegative_sparse():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment