Skip to content

Commit 0e29deb

Browse files
committed
added commented out alternative
1 parent 4797b20 commit 0e29deb

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/_arraykit.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,21 @@ AK_CPL_to_array_via_cast(AK_CodePointLine* cpl, PyArray_Descr* dtype)
19441944
PyObject *array = PyArray_CastToType((PyArrayObject*)array_bytes, dtype, 0);
19451945
// AK_DEBUG_MSG_OBJ("post cast to type", (PyObject*)array_bytes);
19461946

1947+
// Py_INCREF(dtype);
1948+
// PyObject* array = PyArray_NewFromDescr(Py_TYPE(array_bytes),
1949+
// dtype,
1950+
// PyArray_NDIM((PyArrayObject *)array_bytes),
1951+
// PyArray_DIMS((PyArrayObject *)array_bytes),
1952+
// NULL, NULL,
1953+
// 0,
1954+
// array_bytes);
1955+
// if (array == NULL) return NULL;
1956+
1957+
// if (PyArray_CopyInto((PyArrayObject *)array, (PyArrayObject *)array_bytes) < 0) {
1958+
// Py_DECREF(array);
1959+
// return NULL;
1960+
// }
1961+
19471962
Py_DECREF(array_bytes);
19481963
if (array == NULL) {
19491964
// expected array to steal dtype reference

0 commit comments

Comments
 (0)