diff --git a/imperative/python/src/tensor.cpp b/imperative/python/src/tensor.cpp index a38ee999..344046f8 100644 --- a/imperative/python/src/tensor.cpp +++ b/imperative/python/src/tensor.cpp @@ -271,10 +271,7 @@ TensorWrapper::TensorWrapper(PyObject* args, PyObject* kwargs) { } interpreter::Interpreter::Handle handle; - constexpr auto size_threshhold = TensorShape::MAX_NDIM; - if (data.size() > size_threshhold) { - handle = interpreter_for_py->put(npy::np2tensor(data.ptr(), npy::Meth::borrow(cn), dtype), no_cache); - } else { + { HostTensorND ret(cn); handle = interpreter_for_py->put(npy::np2tensor(data.ptr(), npy::Meth::copy_into(&ret), dtype), no_cache); }