stringjax_tools.auto_vectorise.ArgSpec

Contents

stringjax_tools.auto_vectorise.ArgSpec#

class ArgSpec(shape=())#

Bases: object

Optional exact trailing sample-shape specification.

ArgSpec is not needed for the common rank-only API. It is retained as a readable wrapper for entries in sample_shapes or global shape defaults.

Parameters:

shape (Any) – Expected trailing sample shape. Use None or () for a scalar, an int for a fixed one-dimensional sample, a tuple/list for higher-rank samples, a string for attribute lookup on the first bound object exposing that attribute, or a callable receiving the bound argument mapping and returning a concrete shape.

__init__(shape=())#

Methods

__init__([shape])

Attributes

shape