Loading tutorials
pip install numpy).2 min readnp.array and have a rough idea of what a matrix is. Here you will learn the three attributes that describe an array's layout, and the shape mistakes that cause most early NumPy errors.2 min readshape, as covered earlier. It explains how NumPy chooses a dtype, how to convert between dtypes, and the errors that come from mixing them.2 min readshape and ndim (covered in earlier chapters).2 min readshape and dtype, and use basic indexing and slicing. It covers when NumPy shares memory between arrays and when it duplicates data. Mixing these up is a common source of bugs.2 min readshape and dtype, use basic slicing, and tell a view from a copy. Basic slicing selects regular patterns such as a[1:4]. Two other kinds of indexing select arbitrary elements: boolean masks and integer arrays, also called fancy indexing.2 min readndarray is, how to read its shape and dtype, and how to create arrays with np.array and np.arange. Here you will replace Python loops with whole-array expressions.2 min readshape, and use elementwise arithmetic on arrays of equal shape.2 min readsum, mean, max, min, and std are common reductions.2 min readshape, and tell views from copies. Reshaping and transposing change how an array's elements are arranged into dimensions. They leave the values themselves unchanged.2 min readshape, and reshape them, as covered in earlier chapters. It shows how to join several arrays into one.2 min readndim, elementwise arithmetic, and how axis and transposing work. It covers the @ operator and a few routines from np.linalg.2 min readsize argument as a shape tuple. Random arrays are useful for test data, simulations, sampling, and shuffling. NumPy's current interface for them is the Generator object.2 min read