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

Function _block_histogramdd_multiarg

dask/array/routines.py:1160–1179  ·  view source on GitHub ↗

Call numpy.histogramdd for a multi argument blocked/chunked calculation. Slurps the result into an additional outer axis; this new axis will be used to stack chunked calls of the numpy function and add them together later. The last three arguments _must be_ (bins, range, weights).

(*args)

Source from the content-addressed store, hash-verified

1158
1159
1160def _block_histogramdd_multiarg(*args):
1161 """Call numpy.histogramdd for a multi argument blocked/chunked calculation.
1162
1163 Slurps the result into an additional outer axis; this new axis
1164 will be used to stack chunked calls of the numpy function and add
1165 them together later.
1166
1167 The last three arguments _must be_ (bins, range, weights).
1168
1169 The difference between this function and
1170 _block_histogramdd_rect is that here we expect the sample
1171 to be composed of multiple arguments (multiple 1D arrays, each one
1172 representing a coordinate), while _block_histogramdd_rect
1173 expects a single rectangular (2D array where columns are
1174 coordinates) sample.
1175
1176 """
1177 bins, range, weights = args[-3:]
1178 sample = args[:-3]
1179 return np.histogramdd(sample, bins=bins, range=range, weights=weights)[0:1]
1180
1181
1182def histogramdd(sample, bins, range=None, normed=None, weights=None, density=None):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected