Methods of ndarray

The NumPy ndarray class has a lot of methods that work on the array. Most of the time, these methods return an array. You may have noticed that many of the functions part of the NumPy library have a counterpart with the same name and functionality in the ndarray class. This is mostly due to the historical development of NumPy.

The list of ndarray methods is pretty long, so we cannot cover them all. The mean(), var(), sum(), std(), argmax(), argmin(), and mean() functions that we saw earlier are also ndarray methods.

Get NumPy : Beginner's Guide - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.