Commits

Chris Mutel committed dc1620a

Change imports, but don't die if stats_arrays not installed

  • Participants
  • Parent commits f787085
  • Branches stats-arrays

Comments (0)

Files changed (2)

File bw2data/io/import_ecospold.py

 from ..utils import activity_hash
 from ..units import normalize_units
 from lxml import objectify
-from stats_toolkit.distributions import *
+try:
+    from stats_arrays.distributions import *
+except ImportError:
+    LognormalUncertainty = None
 import copy
 import math
 import numpy as np
 
         """
 
+        if LognormalUncertainty is None:
+            print "``stats_array`` not installed!"
+            return
+
         self.log, self.logfile = get_io_logger("lci-import")
         self.new_activities = []
         self.new_biosphere = []

File bw2data/io/import_ecospold2.py

 # from ..logs import get_io_logger
 from ..units import normalize_units
 from lxml import objectify, etree
-from stats_toolkit.distributions import *
+from stats_arrays.distributions import *
 import os
 import progressbar
 import warnings