Annex v0.2.0 Annex.Data.List2D View Source
List2D is a 2 dimensional list of lists of floats.
Link to this section Summary
Functions
Given flat data
and a valid 2-D shape
(in the form of {rows, columns}
)
or a 2D list of lists of floats and a valid 2-D shapereturns a list of
lists, a 2-D list of lists of floats.
Returns true for a list of lists of floats.
The shape of a List2D can be calculated thus
The shape of a List2D can be calculated thus
Link to this section Types
t()
View Source
t() :: [[float(), ...], ...]
t() :: [[float(), ...], ...]
Link to this section Functions
cast(data, shape)
View Source
cast(Annex.Data.flat_data() | t(), Annex.Shape.t()) :: t()
cast(Annex.Data.flat_data() | t(), Annex.Shape.t()) :: t()
Given flat data
and a valid 2-D shape
(in the form of {rows, columns}
)
or a 2D list of lists of floats and a valid 2-D shapereturns a list of
lists, a 2-D list of lists of floats.
is_type?(data)
View Source
is_type?(Annex.Data.data()) :: boolean()
is_type?(Annex.Data.data()) :: boolean()
Returns true for a list of lists of floats.
map(data, func) View Source
shape(data) View Source
The shape of a List2D can be calculated thus:
rows
is the number of elements in the outermost list.
columns
is the count of the elements of the first row.
to_flat_list(data) View Source
The shape of a List2D can be calculated thus:
rows
is the number of elements in the outermost list.
columns
is the count of the elements of the first row.