support NULL strides
@@ -233,6 +233,9 @@ cpdef ndarray fromDlpack(object dltensor) except +:
cdef vector[Py_ssize_t] shape_vec
shape_vec.assign(shape, shape + ndim)
+ if mem.dlm_tensor.dl_tensor.strides is NULL:
+ strides_vec = None
+ else:
cdef int64_t* strides = mem.dlm_tensor.dl_tensor.strides
cdef vector[Py_ssize_t] strides_vec
for i in range(ndim):
