MCPcopy
hub / github.com/dask/dask / __init__

Method __init__

dask/layers.py:407–445  ·  view source on GitHub ↗
(
        self,
        name,
        columns,
        inputs,
        io_func,
        label=None,
        produces_tasks=False,
        creation_info=None,
        annotations=None,
    )

Source from the content-addressed store, hash-verified

405 """
406
407 def __init__(
408 self,
409 name,
410 columns,
411 inputs,
412 io_func,
413 label=None,
414 produces_tasks=False,
415 creation_info=None,
416 annotations=None,
417 ):
418 self.name = name
419 self._columns = columns
420 self.inputs = inputs
421 self.io_func = io_func
422 self.label = label
423 self.produces_tasks = produces_tasks
424 self.annotations = annotations
425 self.creation_info = creation_info
426
427 if not isinstance(inputs, BlockwiseDep):
428 # Define mapping between key index and "part"
429 io_arg_map = BlockwiseDepDict(
430 {(i,): inp for i, inp in enumerate(self.inputs)},
431 produces_tasks=self.produces_tasks,
432 )
433 else:
434 io_arg_map = inputs
435
436 # Use Blockwise initializer
437 task = Task(self.name, io_func, TaskRef(blockwise_token(0)))
438 super().__init__(
439 output=self.name,
440 output_indices="i",
441 task=task,
442 indices=[(io_arg_map, "i")],
443 numblocks={},
444 annotations=annotations,
445 )
446
447 @property
448 def columns(self):

Callers

nothing calls this directly

Calls 5

BlockwiseDepDictClass · 0.90
TaskClass · 0.90
TaskRefClass · 0.90
blockwise_tokenFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected