MCPcopy Create free account
hub / github.com/dask/dask / _select

Function _select

dask/array/routines.py:2268–2276  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

2266
2267
2268def _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)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected