Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Lazily import all of game theory
Browse files Browse the repository at this point in the history
  • Loading branch information
jdemeyer committed Dec 20, 2014
1 parent 20c2ac5 commit 0b67999
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 5 additions & 3 deletions src/sage/game_theory/all.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from cooperative_game import CooperativeGame
from normal_form_game import NormalFormGame
from matching_game import MatchingGame
from sage.misc.lazy_import import lazy_import

lazy_import('sage.game_theory.cooperative_game', 'CooperativeGame')
lazy_import('sage.game_theory.normal_form_game', 'NormalFormGame')
lazy_import('sage.game_theory.matching_game', 'MatchingGame')
12 changes: 5 additions & 7 deletions src/sage/game_theory/normal_form_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,21 +518,19 @@
# (at your option) any later version.
# http://www.gnu.org/licenses/
#*****************************************************************************

from collections import MutableMapping
from itertools import product
from parser import Parser
from sage.combinat.cartesian_product import CartesianProduct
from sage.misc.latex import latex
from sage.misc.lazy_import import lazy_import
from sage.misc.misc import powerset
from sage.rings.all import QQ
from sage.structure.sage_object import SageObject
lazy_import('sage.matrix.constructor', 'matrix')
lazy_import('sage.matrix.constructor', 'vector')
lazy_import('sage.misc.package', 'is_package_installed')
lazy_import('sage.misc.temporary_file', 'tmp_filename')
lazy_import('sage.rings.arith', 'lcm')
lazy_import('sage.rings.rational', 'Rational')
from sage.matrix.constructor import matrix
from sage.matrix.constructor import vector
from sage.misc.package import is_package_installed
from sage.misc.temporary_file import tmp_filename

try:
from gambit import Game
Expand Down

0 comments on commit 0b67999

Please sign in to comment.