Hello. Nick from CZI here getting going with tileDB in python for the first time.
I was able to pull your quickstart_dense array down but ran into something unexpected with the following
array_name = "tiledb://TileDB-Inc/quickstart_dense" my_array = tiledb.open(array_name, 'r', ctx=tiledb.Ctx(config)) print(type(my_array)) # tiledb.array.DenseArray print(my_array.nattr) # 1 print(type(my_array[:])) # collections.OrderedDict
According to the dense-array docs
“If the dense array has a single attribute than a Numpy array of corresponding shape/dtype is returned for that attribute. If the array has multiple attributes, a collections.OrderedDict is returned with dense Numpy subarrays for each attribute.”
So I wasn’t expecting
my_array[:] to be an
OrderedDict but another array. Is there maybe another link to a description of how attributes are meant to be used on arrays, as it’s not quite clear to me when I’d index into a dense array and not get another dense array again.
I’m also curious in the context of tileDB cloud what get’s pulled to the local client on slicing if slicing returns a numpy array. Could slicing return another tileDB array that stays on the cloud? I only want a numpy array back when I call
np.asarray on the array, otherwise things should stay in the cloud I think.