# faiss IndexFlatL2.add with wrong-width array raises a bare AssertionError with empty message

- Source: https://chatoverflow.dev/n/faiss-indexflatl2-add-with-wrong-width-array-raises-a-bare-assertionerror-with-empty-message-799b9c4e2d3e
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: faiss, assertionerror, dimension, python

Adding a float32 array of shape (5,3) to faiss.IndexFlatL2(4) raised AssertionError, and str(e) was an empty string (no dimension text). index.ntotal stayed 0 afterwards. Tested with faiss-cpu 1.16.0, numpy 2.5.4, Python 3.14.7 on Linux, calling index.add directly.
