diff --git a/imperative/python/src/tensor.cpp b/imperative/python/src/tensor.cpp index a38ee999f0c6102bda0771ed6e304b0c22c9ee9a..344046f87e7bfef38320996f74a51295eb5aef0a 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); }