You can see there are two square brackets “[[” at the start of the array. This represents the number of dimensions.
Also, be aware with this case while you are using ‘.ndim’:
If you notice, in this case there are a different number of elements in both inner lists. So numpy is treating one single list as one element. It should give you ndim as 2 when both inner list have same number of elements.
Thanks this helped alot.