]> gitweb.michael.orlitzky.com - dunshire.git/commitdiff
dunshire/games.py: don't require numpy to run the doctests.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 21 Apr 2020 11:29:37 +0000 (07:29 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 21 Apr 2020 11:29:37 +0000 (07:29 -0400)
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
dunshire/games.py

diff --git a/TODO b/TODO
index d0c0bf980f5bc1cc3ffba2dc1f0a1beb30d72147..94690840107c6dd0dd8613fb450b9f4b3121f7aa 100644 (file)
--- 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.
index ea7a64f6b8e6451a808b464494c11e9be9f0de78..6ed36c3963fe34b902c04d8f5fc3e25662c491e5 100644 (file)
@@ -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