np.concatenate raises ValueError on joining arrays with incompatible shapes in NumPy 1.24
I'm working on a personal project and I'm relatively new to this, so bear with me. I'm trying to use `np.concatenate` to join two NumPy arrays along a specific axis, but I'm running into a `ValueError`. I'm attempting to concatenate arrays of shapes (3, 4) and (2, 4) along axis 0, which I expected to work since they have compatible dimensions in the other axis. Hereโs the code Iโm using: ```python import numpy as np a = np.random.rand(3, 4) b = np.random.rand(2, 4) result = np.concatenate((a, b), axis=0) ``` When I run this, I get the following behavior: ``` ValueError: all the input arrays must have the same number of dimensions ``` Iโve checked the shapes of the arrays, and they seem correct. I also tried reshaping the arrays to (3, 4) and (2, 4) explicitly before concatenation but still faced the same scenario. Iโm unsure why Iโm receiving this behavior, as the shapes seem compatible for concatenation. Can someone guide to understand whatโs going wrong here? Are there any additional considerations I should be aware of when using `np.concatenate`? Thanks! What am I doing wrong? I'm working on a API that needs to handle this. What am I doing wrong? I'm on Ubuntu 22.04 using the latest version of Python. Thanks, I really appreciate it!