stheno.lazy module

class stheno.lazy.LazyMatrix[source]

Bases: stheno.lazy.LazyTensor

A lazy matrix.

add_left_rule(i_left, indices, builder)[source]

Add a building rule for a given left index.

Note

For performance reasons, indices must already be resolved!

Parameters
  • i_left (int) – Fixed left index.

  • indices (set) – Domain of the rule.

  • builder (function) – Function that takes in a right index and gives back the corresponding element.

add_right_rule(i_right, indices, builder)[source]

Add a building rule for a given right index.

Note

For performance reasons, indices must already be resolved!

Parameters
  • i_right (int) – Fixed right index.

  • indices (set) – Domain of the rule.

  • builder (function) – Function that takes in a left index and gives back the corresponding element.

add_rule(indices, builder)[source]

Add a building rule.

Note

For performance reasons, indices must already be resolved!

Parameters
  • indices (set) – Domain of the rule.

  • builder (function) – Function that takes in an index and gives back the corresponding element.

class stheno.lazy.LazyVector[source]

Bases: stheno.lazy.LazyTensor

A lazy vector.

add_rule(indices, builder)[source]

Add a building rule.

Note

For performance reasons, indices must already be resolved!

Parameters
  • indices (set) – Domain of the rule.

  • builder (function) – Function that takes in an index and gives back the corresponding element.