Skip to content
Float64Sequence

Float64Sequence

Mojo trait 🡭

Float64Sequence

Anything with a length and Int-indexed Float64 access. Conform a data-holding struct to this to pass it directly as Plot.encode()’s x/y without first copying it into a List[Float64].

A minimal read-only shape: only what _materialize_floats needs to walk the sequence once. No slicing, mutation, or Copyable/Movable requirement.

Implemented traits

AnyType, Sized

Methods

__getitem__

fn def __getitem__(self, idx: Int) -> Float64

Args:

  • self (_Self)
  • idx (Int)

Returns:

Float64