This is a version of :func:`numpy.select` that accepts an arbitrary number of arguments and splits them in half to create ``condlist`` and ``choicelist`` params.
(*args, **kwargs)
| 2266 | |
| 2267 | |
| 2268 | def _select(*args, **kwargs): |
| 2269 | """ |
| 2270 | This is a version of :func:`numpy.select` that accepts an arbitrary number of arguments and |
| 2271 | splits them in half to create ``condlist`` and ``choicelist`` params. |
| 2272 | """ |
| 2273 | split_at = len(args) // 2 |
| 2274 | condlist = args[:split_at] |
| 2275 | choicelist = args[split_at:] |
| 2276 | return np.select(condlist, choicelist, **kwargs) |
| 2277 | |
| 2278 | |
| 2279 | @derived_from(np) |
nothing calls this directly
no outgoing calls
no test coverage detected