I have an ArangoDB collection containing some documents. I need to get one of them, add or update some data and save it.
To get the document, I use Document _key field on Collection instance:
doc = collection[key]
Then, I update with a dict data:
for k, v in data.items():
doc[k] = v
finally, I save it
doc.save()
Unfortunately some of the int are converted to string
Juste before saving:
And when I reload it with doc2 = collection[key]:
From what I'm seeing, I guess I could convert all int to float before saving, but it's kind of messy.
What am I doing wrong?


Well, it turns out, some
intwhere in factnumpy.int64and pyarango handle them asstringI simple
int(value) if isinstance(value, np.int64) else valuefixed this issue (called recursively in my case, using this answer).