-
Type:
New Feature
-
Resolution: resolved
-
Priority:
Minor
-
Component/s: None
-
None
From Ryan Herbst:
Block.cpp
if (PyArray_TYPE(arr) == NPY_UINT64) {
uint64_t* src = reinterpret_castuint64_t*(PyArray_DATA(arr));
npy_intp stride = strides[0] / sizeof(uint64_t);
for (x = 0; x < dims[0]; x++) {
setUInt(src[x * stride], var, index + x);
and here:
Block.cpp
if (var->valueBits_ > 32) {
obj = PyArray_SimpleNew(1, dims, NPY_UINT64);
PyArrayObject* arr = reinterpret_castPyArrayObject*(obj);
uint64_t* dst = reinterpret_castuint64_t*(PyArray_DATA(arr));
seems like we may also want to support uin8 and uint16
in one project I want to access as 8-bit locations so I have to convert the numpy array to astype(np.uint32) which is a copy in order to write an array of 8-bit values to a list variable