1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Bumpy array vs. Python list?
Bumpy array → elements use the same data type
Python list → can contain different data types
What does .shape tell you?
Array dimensions
Example: rows x columns
What does .size tell you?
Total number of elements
What does .ndim tell you?
Number of dimensions/ axes
In NumPy slicing, is STOP included?
NO.
Start ✅
Stop 🛑
What does a negative index do?
Counts from the end.
-1 → last element
What does this do?
arr[::-1]
Reverses the array
What does this do?
are[::2]
Selects every second element
What does np.array([…]) do?
Creates a NumPy array from a list
What does np.ones((2,3)) create?
A 2×3 array
Filled with:
1.0
What does np.zeros((2,3)) create?
A 2×3 array
Filled with:
0.0
What does np.linspace(start, stop.num) do?
Creates num evenly spaced values
From start → stop.
STOP included by default