# Does ES support array of dense vectors?

**URL:** <https://discuss.elastic.co/t/does-es-support-array-of-dense-vectors/285687>\
**Category:** Elasticsearch\
**Created:** [October 1, 2021, 2:46pm UTC](https://discuss.elastic.co/t/does-es-support-array-of-dense-vectors/285687 "2021-10-01T14:46:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fred\_Kufner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fred_kufner/32/95254_2.png) [@Fred\_Kufner](https://discuss.elastic.co/u/Fred_Kufner)\
**Post date:** [October 1, 2021, 2:46pm UTC](https://discuss.elastic.co/t/does-es-support-array-of-dense-vectors/285687/1 "2021-10-01T14:46:45Z")

</div>

I am having problems updating a document with an array of dense vectors. According to the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/array.html) (and empirically by my code in other areas) , **In Elasticsearch, there is no dedicated array data type. Any field can contain zero or more values by default, however, all values in the array must be of the same data type**.

mapping:

```auto
"test_vector": {
    "type": "dense_vector",
    "dims": 3
}

```

* * *

update in python, this fails:

```auto
my_vector1 = [0.5, 0.2, 0.1]
      my_vector2 = [0.1, 0.4, 0.8]
      test_vector=[] # list
      test_vector.append(my_vector1)
      test_vector.append(my_vector2)
      doc = {
        "test_vector":test_vector
      }
      ret_val = elastic_client.update(index=index, id=_id,body={"doc":doc})

```

'Failed to parse object: expecting token of type [VALUE\_NUMBER] but found [START\_ARRAY]'

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 29, 2021, 2:46pm UTC](https://discuss.elastic.co/t/does-es-support-array-of-dense-vectors/285687/2 "2021-10-29T14:46:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
