NumPy TutorialLesson 3Free preview
NumPy Getting Started
This lesson is part of NumPy · All levels
Summary
Starting NumPy is just by importing the modules, usually with the alias np, and then creating an array of lists or tuple. Once the array is formed, you can immediately run a mathematical operation that works on all the elements at once. The following example of use shows how to access elements and total calculations without manual repetition.
Key points
- Import NumPy with import NumPy as np command.
- Np.array() receives a list or tuple to make an array.
- Operations like * and + apply to every element of the array.
- The size attribute indicates the total number of elements in an array.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.