We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17ac36c commit f2dd238Copy full SHA for f2dd238
src/scipy-type.cpp
@@ -28,7 +28,13 @@ const PyTypeObject* ScipyType::getScipyCSCMatrixType() {
28
}
29
30
ScipyType::ScipyType() {
31
- sparse_module = bp::import("scipy.sparse");
+ try {
32
+ sparse_module = bp::import("scipy.sparse");
33
+ } catch (...) {
34
+ throw std::runtime_error(
35
+ "SciPy is not installed. "
36
+ "You can install it using the command \'pip install scipy\'.");
37
+ }
38
39
#if PY_MAJOR_VERSION >= 3
40
// TODO I don't know why this Py_INCREF is necessary.
0 commit comments