Lecture 2.3.3 needs update: numpy.rank has been replaced by numpy.ndim

As the title says, numpy.rank has been deprecated and substituted with numpy.dim.

As a beginner, I wasted a lot of time on lecture 2.3.3. There, np.rank appears in the tab completion on the figure in and subsequently in an example where np.rank? is being used. I thought the problem was mine, but I figured out that np.rank has been removed in version 1.18 of NumPy.

See: NumPy 1.18.0 Release Notes — NumPy v1.24.dev0 Manual

Many thanks @byron , much appreciated.

I’ve opened an issue: replace np.rank with np.dim · Issue #186 · QuantEcon/lecture-python-programming.myst · GitHub