diff --git a/pymc3/__init__.py b/pymc3/__init__.py index 8c851adfedb..e5ec5e13e38 100644 --- a/pymc3/__init__.py +++ b/pymc3/__init__.py @@ -6,7 +6,15 @@ from .distributions import transforms from .glm import * from . import gp -from .math import logaddexp, logsumexp, logit, invlogit, expand_packed_triangular, probit, invprobit +from .math import ( + logaddexp, + logsumexp, + logit, + invlogit, + expand_packed_triangular, + probit, + invprobit, +) from .model import * from .model_graph import model_to_graphviz from . import ode @@ -29,8 +37,24 @@ from .data import * + +def __set_compiler_flags(): + # Workarounds for Theano compiler problems on various platforms + import platform + import theano + + system = platform.system() + if system == "Windows": + theano.config.mode = "FAST_COMPILE" + elif system == "Darwin": + theano.config.gcc.cxxflags = "-Wno-c++11-narrowing" + + +__set_compiler_flags() + import logging -_log = logging.getLogger('pymc3') + +_log = logging.getLogger("pymc3") if not logging.root.handlers: _log.setLevel(logging.INFO) if len(_log.handlers) == 0: