Skip to content

Commit

Permalink
More verbose error reporting when importing numpy module
Browse files Browse the repository at this point in the history
  • Loading branch information
kngwyu committed Jul 16, 2020
1 parent cc895a2 commit 50ee9ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/npyffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn get_numpy_api(_py: Python, module: &str, capsule: &str) -> *const *const c_vo
let numpy = ffi::PyImport_ImportModule(module.as_ptr());
assert!(!numpy.is_null(), "Failed to import numpy module");
let capsule = ffi::PyObject_GetAttrString(numpy as _, capsule.as_ptr());
assert!(!capsule.is_null(), "Failed to import numpy module");
assert!(!capsule.is_null(), "Failed to get numpy capsule API");
ffi::PyCapsule_GetPointer(capsule, null_mut()) as _
}
}
Expand Down

0 comments on commit 50ee9ef

Please sign in to comment.