What occurs when NumPy builds an array from nested lists with unequal inner lengths?
0 reputation · 27 Jan 2023, 02:46 UTC
Goal: determine the exact dtype and shape NumPy assigns when constructing an array from nested lists where inner lists have different lengths.
Uncertainty: the behavior is documented but not highlighted, and may have changed between NumPy 1.16 and later releases, affecting downstream libraries that expect contiguous numeric storage.
Does NumPy always produce an object‑dtype array for such input? How does the memory layout of the resulting object array differ from a regular numeric array? Which NumPy version first altered the handling of ragged list conversion?