Skip to content

Commit

Permalink
use try for importing scikit-learn
Browse files Browse the repository at this point in the history
  • Loading branch information
takuya-araki committed Nov 15, 2019
1 parent d3c50be commit b502560
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/foreign_if/python/examples/lda_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
from scipy.sparse import csr_matrix
from frovedis.exrpc.server import *
from frovedis.matrix.crs import FrovedisCRSMatrix
from sklearn.feature_extraction.text import CountVectorizer
import sys

try:
from sklearn.feature_extraction.text import CountVectorizer
except:
print ('Please prepare environment with scikit-learn (see tutorial)')
quit()

# initializing the Frovedis server
argvs = sys.argv
Expand Down

0 comments on commit b502560

Please sign in to comment.