From: Michael Orlitzky Date: Thu, 13 Oct 2016 23:08:44 +0000 (-0400) Subject: Eliminate some unused variables by slicing a tuple before assignment. X-Git-Tag: 0.1.0~143 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=dunshire.git;a=commitdiff_plain;h=1ca8acdcd524d20d30c6607323a19318d012244a Eliminate some unused variables by slicing a tuple before assignment. --- diff --git a/src/dunshire/games.py b/src/dunshire/games.py index 10a5eee..4ce323c 100644 --- a/src/dunshire/games.py +++ b/src/dunshire/games.py @@ -849,9 +849,7 @@ class SymmetricLinearGameTest(TestCase): This test theoretically applies to the ice-cream cone as well, but we don't know how to make positive operators on that cone. """ - (_, K, e1, e2) = _random_orthant_params() - - # Ignore that L, we need a nonnegative one. + (K, e1, e2) = _random_orthant_params()[1:] L = _random_nonnegative_matrix(K.dimension()) game = SymmetricLinearGame(L, K, e1, e2) @@ -887,10 +885,7 @@ class SymmetricLinearGameTest(TestCase): """ Test that a Lyapunov game on the nonnegative orthant works. """ - (L, K, e1, e2) = _random_orthant_params() - - # Ignore that L, we need a diagonal (Lyapunov-like) one. - # (And we don't need to transpose those.) + (K, e1, e2) = _random_orthant_params()[1:] L = _random_diagonal_matrix(K.dimension()) self.assert_lyapunov_works(L, K, e1, e2) @@ -900,10 +895,7 @@ class SymmetricLinearGameTest(TestCase): """ Test that a Lyapunov game on the ice-cream cone works. """ - (L, K, e1, e2) = _random_icecream_params() - - # Ignore that L, we need a diagonal (Lyapunov-like) one. - # (And we don't need to transpose those.) + (K, e1, e2) = _random_icecream_params()[1:] L = _random_lyapunov_like_icecream(K.dimension()) self.assert_lyapunov_works(L, K, e1, e2)