# Variable-length Attributes in Python

**URL:** <https://forum.tiledb.com/t/variable-length-attributes-in-python/100>\
**Category:** Uncategorized\
**Created:** [July 31, 2019, 12:11am UTC](https://forum.tiledb.com/t/variable-length-attributes-in-python/100 "2019-07-31T00:11:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haehn](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/haehn/32/33_2.png) [@haehn](https://forum.tiledb.com/u/haehn)\
**Post date:** [July 31, 2019, 12:11am UTC](https://forum.tiledb.com/t/variable-length-attributes-in-python/100/1 "2019-07-31T00:11:32Z")

</div>

Hello - I am new to TileDB but I am starting to enjoy it 🙂

When will Variable-length Attributes be available in the Python API?

---

<div class="post-metadata">

**Author:** ![ihnorton](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/ihnorton/32/23_2.png) [@ihnorton](https://forum.tiledb.com/u/ihnorton)\
**Post date:** [July 31, 2019, 2:27am UTC](https://forum.tiledb.com/t/variable-length-attributes-in-python/100/2 "2019-07-31T02:27:33Z")

</div>

Variable-length attributes are available – I will update that doc. Object arrays (`np.dtype("O")` / `np.object`) can contain variable-length subarrays as elements. If something doesn’t work the way you hope, please let us know here or on github. There are a number of examples in the following test section:

> <https://github.com/TileDB-Inc/TileDB-Py/blob/dev/tiledb/tests/test_libtiledb.py#L1083-L1274>

(btw, NumPy tries very hard to keep arrays contiguous, so it can sometimes be tricky to maintain the object dtype when operating on an array)

---

<div class="post-metadata">

**Author:** ![haehn](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/haehn/32/33_2.png) [@haehn](https://forum.tiledb.com/u/haehn)\
**Post date:** [August 1, 2019, 11:11am UTC](https://forum.tiledb.com/t/variable-length-attributes-in-python/100/3 "2019-08-01T11:11:46Z")

</div>

Thank you so much! Will try it!
