From 9ac352dcec6ddb07c62753d718c3874550a00c62 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 21 Jan 2021 12:19:18 +0000 Subject: [PATCH] fix external allocation --- cuvec/include/pycuvec.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuvec/include/pycuvec.cuh b/cuvec/include/pycuvec.cuh index 5918aca..fd78c6b 100644 --- a/cuvec/include/pycuvec.cuh +++ b/cuvec/include/pycuvec.cuh @@ -204,7 +204,7 @@ template struct PyCuVec_tp { template PyCuVec *PyCuVec_new() { static PyCuVec_tp Vector_T; if (PyType_Ready(&Vector_T.tp_obj) < 0) return NULL; - return (PyCuVec *)Vector_T.tp_obj.tp_alloc(&Vector_T.tp_obj, 0); + return (PyCuVec *)Vector_T.tp_obj.tp_alloc(&Vector_T.tp_obj, 1); } template PyCuVec *PyCuVec_zeros(std::vector shape) { PyCuVec *self = PyCuVec_new();