Loading tutorials
np.array, np.arange, and reshape, and know what an array's shape and dtype are. An integer index picks exactly one position along an axis. It is the base for slicing, masks, and fancy indexing in later chapters.2 min readnp.arange and reshape, and know what an array's shape is. A slice selects a range of positions along an axis. It uses the same start:stop:step rules as Python lists, applied to each axis of an array.2 min readstart:stop:step, and that you know what shape means. Two small tools extend slicing. ... (Ellipsis) stands in for "all the remaining axes". np.newaxis inserts a new axis of length 1.3 min readnp.arange and reshape, and that you know basic slicing with start:stop:step. It covers a question every NumPy user hits sooner or later: when you select part of an array, do you get your own data or a window onto the original?2 min readnp.array, np.arange, and reshape. It also assumes you know integer indexing and slicing, and what an array's shape and dtype are. Here you will build a boolean mask from a comparison and use it to pick out elements.2 min readdata > 0 and use it to filter an array. It also assumes you know what an array's shape and dtype are. Here you will combine several conditions into one mask.3 min read&, |, and ~. Here you will use masks to change data, and np.where to build a new array from a condition.2 min readnp.arange and reshape, read an array's shape, and use integer indices and slices on one- and two-dimensional arrays. It also assumes you know that a basic slice is a view of the original array.2 min reada[mask, 1:3]. Predicting the result takes a few rules.2 min read