Checks keywords and returns the appropriate function object.
(self, **kwargs)
| 306 | return s.values |
| 307 | |
| 308 | def _determine_func(self, **kwargs): |
| 309 | """Checks keywords and returns the appropriate function object.""" |
| 310 | # Check whether keys are recognized |
| 311 | for key in kwargs.keys(): |
| 312 | if key not in self._parameter_map.keys(): |
| 313 | raise FairException('"{}"" is not a recognized keyword'.format(key)) |
| 314 | # Check whether all keys go to same function via set comprension |
| 315 | functions = list(set([ |
| 316 | self._parameter_map[key] |
| 317 | for key |
| 318 | in kwargs.keys() |
| 319 | ])) |
| 320 | if len(functions) > 1: |
| 321 | raise FairException('"{}" mixes incompatible keywords.'.format(str(kwargs.keys()))) |
| 322 | else: |
| 323 | function = functions[0] |
| 324 | return function |
| 325 | |
| 326 | def _gen_constant(self, count, **kwargs): |
| 327 | """Generates constant array of size `count`""" |
no test coverage detected