What is NumPy?
Curriculum Overview
Topics & Key Concepts
Sample Flashcard Questions & Answers
Showing 8 of 81 cardsWhat is a NumPy array?
How do you create a 2-dimensional NumPy array?
What is the purpose of the `reshape` method in NumPy?
How do you access elements in a NumPy array?
What does `numpy.zeros` do?
What does `numpy.ones` do?
```
shape = (3, 4) # 3 rows and 4 columns
ones_array = np.ones(shape)
```
What is broadcasting in NumPy?
```
import numpy as np
# Create a 2D array and a 1D array
array_2d = np.array([[1, 2, 3],
[4, 5, 6]]) # Shape: (2, 3)
array_1d = np.array([10, 20, 30]) # Shape: (3,)
# Broadcasting the 1D array across each row of the 2D array
result = array_2d + array_1d
print("2D array shape:", array_2d.shape)
print("1D array shape:", array_1d.shape)
print("Result shape:", result.shape)
print("\n2D array:")
print(array_2d)
print("\n1D array:")
print(array_1d)
print("\nResult after broadcasting:")
print(result)
```
## Output
```
2D array shape: (2, 3)
1D array shape: (3,)
Result shape: (2, 3)
2D array:
[[1 2 3]
[4 5 6]]
1D array:
[10 20 30]
Result after broadcasting:
[[11 22 33]
[14 25 36]]
```
Want to study all 81 flashcards with spaced repetition?
Practice with Anki-style scheduling, Hands-Free audio commute mode, and AI Tutor explanations.
Start Studying Full Deck NowHow You Can Study This Deck on Chat Robotics
Anki Spaced Repetition (SRS)
Algorithms schedule review intervals automatically so you retain 90%+ in minimum study time.
Hands-Free Audio Commute Mode
High-fidelity Neural Text-To-Speech reads questions and answers aloud with customizable delay timers.
Built-in AI Tutor Assistant
Stuck on a tricky concept? Click "Ask AI" on any card to receive instant deep-dive step-by-step explanations.
Subdeck & Tag Organization
Organize and filter by topic tags or drill entire subdeck hierarchies sequentially in Subdeck Scheduler.
- 81 Curated Flashcards
- Full Anki Spaced Repetition
- Hands-Free Audio TTS Mode
- AI Concept Tutor on every card
- Works on Mobile, Tablet & Desktop