Skip to content

Commit

Permalink
FIX Issue#1 removed always-on warning messages due to missing compile…
Browse files Browse the repository at this point in the history
…d C++ libraries. Instead, error messages will appear on-demand if desired C++ functionality is requested. Otherwise, user wont be bothered
  • Loading branch information
michaelchughes committed Dec 19, 2016
1 parent a660d94 commit 7571513
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions bnpy/util/lib/sparseResp/CPPLoader.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ctypes
import warnings
from numpy.ctypeslib import ndpointer

def LoadFuncFromCPPLib(libpath, srcpath, funcName):
Expand Down Expand Up @@ -37,7 +36,6 @@ def LoadFuncFromCPPLib(libpath, srcpath, funcName):
setattr(getattr(lib, funcName), 'argtypes', argTypeList)
return getattr(lib, funcName)
except OSError as e:
warnings.warn(str(e))
def errorFunc(*args, **kwargs):
raise ImportError("Could not import C++ func: %s" % (funcName))
return errorFunc
Expand Down
1 change: 0 additions & 1 deletion bnpy/util/lib/sparseResp/LibSparseResp.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,6 @@ def calcSparseLocalParams_SingleDoc(
ndpointer(ctypes.c_int),
]
except OSError as e:
print str(e)
# No compiled C++ library exists
hasEigenLibReady = False

Expand Down

0 comments on commit 7571513

Please sign in to comment.