NumPy: A Love-Hate Relationship with Python's Array Library

This article delves into the pain points of using NumPy, Python's popular array computation library, when dealing with multi-dimensional arrays. While NumPy excels with its simplicity and efficiency for lower-dimensional arrays, its broadcasting mechanism and indexing become incredibly complex and hard to understand when tackling more intricate multi-dimensional operations. The author argues that NumPy's core issue stems from its broadcasting mechanism replacing indices, resulting in limited expressiveness. The article uses multiple examples to highlight NumPy's struggles with complex array computations, comparing the pros and cons of using loops and np.einsum, ultimately expressing frustration with NumPy and a desire for a more user-friendly array language.