def input_sensitivity(self, summarize=True):
if not summarize:<EOL><INDENT>num_params = [<NUM_LIT:0>]<EOL>parts = []<EOL>def sum_params(x):<EOL><INDENT>if (not isinstance(x, CombinationKernel)) and isinstance(x, Kern):<EOL><INDENT>num_params[<NUM_LIT:0>] += <NUM_LIT:1><EOL>parts.append(x)<EOL><DEDENT><DEDENT>self.traverse(sum_params)<EOL>i_s = np.zeros((num_params[<NUM_LIT:0>], self.input_dim))<EOL>from operator import setitem<EOL>[setitem(i_s, (i, k._all_dims_active), k.input_sensitivity(summarize)) for i, k in enumerate(parts)]<EOL>return i_s<EOL><DEDENT>else:<EOL><INDENT>raise NotImplementedError("<STR_LIT>")<EOL><DEDENT>
If summize is true, we want to get the summerized view of the sensitivities,
otherwise put everything into an array with shape (#kernels, input_dim)
in the order of appearance of the kernels in the parameterized object.