Commit b8318307 authored by Philipp  Trunschke's avatar Philipp Trunschke

issue warning when converting sparse tensors to dense ndarrays

parent d65cff14
Pipeline #927 passed with stages
in 8 minutes and 55 seconds
......@@ -111,6 +111,7 @@ void expose_tensor() {
if (_this.is_dense()) {
pyObj = PyArray_SimpleNewFromData(int(, &dimensions[0], NPY_DOUBLE, _this.get_dense_data());
} else {
std::cerr << "RuntimeWarning: converting sparse tensor to dense ndarray" << std::endl;
int nd = int(;
npy_intp* dims = &dimensions[0];
int typenum = NPY_DOUBLE;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment