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

Function view

dask/array/chunk.py:282–294  ·  view source on GitHub ↗
(x, dtype, order="C")

Source from the content-addressed store, hash-verified

280
281
282def view(x, dtype, order="C"):
283 if order == "C":
284 try:
285 x = np.ascontiguousarray(x, like=x)
286 except TypeError:
287 x = np.ascontiguousarray(x)
288 return x.view(dtype)
289 else:
290 try:
291 x = np.asfortranarray(x, like=x)
292 except TypeError:
293 x = np.asfortranarray(x)
294 return x.T.view(dtype).T
295
296
297def slice_with_int_dask_array(x, idx, offset, x_size, axis):

Callers

nothing calls this directly

Calls 1

viewMethod · 0.80

Tested by

no test coverage detected