How to create the empty array

I have some edge cases where empty arrays need be represented in tiledb, e.g. matrix of (0 x ncols) or (nrows x 0).
I am having trouble to model those since tiledb::dimension (for dense) doesn’t allow empty domains {1,0},
but if I set domain as {1,1}, it can’t really model the empty array, right?

Regardless of what domain you specify for the array, unless you write anything to the array, the array is “empty”. You can determine this by checking the “non-empty domain”:

That returns a bounding hyper-rectangle for all the writes you have performed. If that is empty/null then you know that your array is actually empty.

I hope this helps.

Awesome! This resolves my problems. Hope you can help with vector issue (see its separate post) when you get a chance.