From: Michael Orlitzky Date: Tue, 21 Apr 2020 11:29:37 +0000 (-0400) Subject: dunshire/games.py: don't require numpy to run the doctests. X-Git-Tag: 0.1.2~14 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=ff9a508f946f02c9c8896ebadccf2a44525a52a9;p=dunshire.git 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. --- 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