metadsl_core.vec

Classes

NoValue(function, args, kwargs)

Returned by a getitem function that can have no inputs

Selection(function, args, kwargs)

A selection represents a mapping from a vector to a new vector, that includes some subset of the old values, but in new positions.

Vec(function, args, kwargs)

A tuple of homogonous types.

class metadsl_core.vec.Selection(function, args, kwargs)[source]

A selection represents a mapping from a vector to a new vector, that includes some subset of the old values, but in new positions. Old values can be duplicated.

args: List[object]
create_indices(cls, indices) = Selection.create_indices[source]
create_slice(cls, start, stop, step) = Selection.create_slice[source]
create_slice_optional(cls, start, stop, step) = Selection.create_slice_optional[source]
function: Callable
kwargs: Dict[str, object]
length(self, old_length) = Selection.length[source]
new_to_old(self, idx) = Selection.new_to_old[source]
old_to_new(self, idx) = Selection.old_to_new[source]
class metadsl_core.vec.Vec(function, args, kwargs)[source]

A tuple of homogonous types.

append(self, x) = Vec.append[source]
args: List[object]
create(cls, *items) = Vec.create[source]
create_fn(cls, length, fn) = Vec.create_fn[source]
drop(self, i) = Vec.drop[source]
empty(self) = Vec.empty[source]
first(self) = Vec.first[source]
fold(self, initial, fn) = Vec.fold[source]
function: Callable
kwargs: Dict[str, object]
length(self) = Vec.length[source]
lift_maybe(cls, vec) = Vec.lift_maybe[source]
map(self, fn) = Vec.map[source]
select(self, selection) = Vec.select[source]
set(self, i, value) = Vec.set[source]
set_selection(self, s, values) = Vec.set_selection[source]
take(self, i) = Vec.take[source]