M5S1 Flashcards
What is NumPy short for?
Numerical Python
What is NumPy?
A foundational package for numerical computing in Python.
Why NumPy?
- Efficient calculations for large arrays of numbers.
- Computations on entire arrays without for loops.
- Array-oriented computing.
To utilize the package, the initial step involves employing an import command:
import numpy as np
A generic multidimensional container for homogenous data.
ndarray
Index starts at 0 and increments by 1 in each succeeding position
Array
It takes a ________ as input and produces a NumPy array containing the passed data
Sequence
Every array has:
- shape
- dtype
- ndim
Tuple indicating size of each dimension
Shape
Data type of the array
dtype
Number of dimensions
ndim
More ways to create arrays
np.zeros()
np.ones()
np.arange()
T or F
NumPy has many functions
that can take arrays as input
argument.
True
T or F
The output is the
function evaluated for every
element of the input array.
True
In T attribute, what does T stand for?
Transpose