Complete the code to import the submodule for optimization from SciPy.
from scipy import [1]
The optimize submodule in SciPy contains functions for optimization tasks.
Complete the code to use the SciPy submodule for statistical functions.
import scipy.[1] as stats result = stats.sem([1, 2, 3, 4])
The stats submodule provides statistical functions like sem, skew, and distributions.
Fix the error in the code to correctly import the linear algebra submodule from SciPy.
from scipy import [1] result = [1].inv([[1, 2], [3, 4]])
The linalg submodule contains linear algebra functions like matrix inversion.
Fill both blanks to create a dictionary that maps each SciPy submodule name to its description.
submodules = {
'optimize': 'functions for [1]',
'integrate': 'tools for [2]'
}optimize is for optimization tasks, and integrate is for integration tasks.
Fill all three blanks to create a dictionary that maps submodule names to their common function names.
common_funcs = {
'stats': '[1]',
'linalg': '[2]',
'optimize': '[3]'
}stats commonly uses sem, linalg uses inv for matrix inversion, and optimize uses minimize for optimization.