05 - Jupyter Notebook - Array Fundamentals
Автор: Rishi’s programming channel
Загружено: 2024-12-15
Просмотров: 75
@backstreetbrogrammer
--------------------------------------------------------------------------------
Chapter 4. Jupyter Notebook - Array Fundamentals
--------------------------------------------------------------------------------
Code demo:
Create a new list
Create an ndarray using list
Access array elements
ndarray is mutable, same as list
like the original list, Python slice notation can be used for indexing
2D list
2D ndarray
list of lists elements can be accessed by specifying indices using 2 square brackets.
One major difference is that slice indexing of a list "copies" the elements into a new list, but slicing an array returns a "view": an object that refers to the data in the original array.
The original array can be mutated using the view.
Another difference between a 2D ndarray and a list of lists is that an element of the array can be accessed by specifying the index along each axis within a single set of square brackets, separated by commas.
We might hear of:
a 0-D (zero-dimensional) array referred to as a “scalar”,
a 1-D (one-dimensional) array as a “vector”,
a 2-D (two-dimensional) array as a “matrix”,
or, an N-D (N-dimensional, where “N” is typically an integer greater than 2) array as a “tensor”.
For clarity, it is best to avoid the mathematical terms when referring to an array because the mathematical objects with these names behave differently than arrays
(e.g. “matrix” multiplication is fundamentally different from “array” multiplication), and there are other objects in the scientific Python ecosystem that have these names
(e.g. the fundamental data structure of PyTorch is the “tensor”).
Github: https://github.com/backstreetbrogramm...
Introduction to NumPy Playlist: • Introduction to NumPy
Apache Spark for Java Developers Playlist: • Apache Spark for Java Developers
Top Java Coding Interview Problems Playlist: • Top Java Coding Interview Problems
Java Serialization Playlist: • Java Serialization
Dynamic Programming Playlist: • Dynamic Programming
#python #datascience

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: