Which of the following is the correct syntax to find the minimum value of a NumPy array named data?
easy📝 Conceptual Q3 of 15
NumPy - Aggregation Functions
Which of the following is the correct syntax to find the minimum value of a NumPy array named data?
Adata.min()
Bnp.min(data)
Cnp.min[data]
Ddata.min
Step-by-Step Solution
Solution:
Step 1: Identify correct function call syntax
np.min() is a function and requires parentheses with the array as argument.
Step 2: Check each option
np.min(data) uses correct function call syntax. data.min() is a method call on the array, which is valid but not the question's focus. np.min[data] uses brackets incorrectly. data.min misses parentheses.
Final Answer:
np.min(data) -> Option B
Quick Check:
Function call syntax uses parentheses [OK]
Quick Trick:Use parentheses () to call np.min() function [OK]
Common Mistakes:
Using square brackets instead of parentheses
Missing parentheses
Confusing method and function syntax
Master "Aggregation Functions" in NumPy
9 interactive learning modes - each teaches the same concept differently