From ff9a508f946f02c9c8896ebadccf2a44525a52a9 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 21 Apr 2020 07:29:37 -0400 Subject: [PATCH] dunshire/games.py: don't require numpy to run the doctests. There was a pointless use of numpy.matrix in a doctest that made numpy a direct dependency of dunshire. No bueno. That test case was also throwing a PendingDeprecationWarning, so we kill two birds with one commit by removing it. --- TODO | 3 --- dunshire/games.py | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/TODO b/TODO index d0c0bf9..9469084 100644 --- a/TODO +++ b/TODO @@ -8,6 +8,3 @@ 4. Add random_game() and use it to replace all of the tests where the cone is irrelevant. This should be done only after we are feature complete and sure that everything works. - -5. Remove the one use of numpy.matrix in a doctest, since that's - an annoying dependency to have just to run the test suite. diff --git a/dunshire/games.py b/dunshire/games.py index ea7a64f..6ed36c3 100644 --- a/dunshire/games.py +++ b/dunshire/games.py @@ -249,12 +249,11 @@ class SymmetricLinearGame: there is no row/column ambiguity:: >>> import cvxopt - >>> import numpy >>> from dunshire import * >>> K = NonnegativeOrthant(2) >>> L = [[1,0],[0,1]] >>> e1 = cvxopt.matrix([1,1]) - >>> e2 = numpy.matrix([1,1]) + >>> e2 = (1,1) >>> G = SymmetricLinearGame(L, K, e1, e2) >>> print(G) The linear game (L, K, e1, e2) where -- 2.43.2