traveler.tables.JaxTable#
- class traveler.tables.JaxTable(*args, **kwargs)[source]#
Bases:
JaxDatasetAnalog of a pyarrow Table, but with JAX arrays.
Every column is a JAX array, and each should be a 1D array of common length, or a 0D array (scalar). The table can be indexed or sliced by row. Column ordering is loosely preserved, but not guaranteed.
Allocate a table with an empty row-count cache.
- Parameters:
*args (Any) – Positional initialization arguments.
**kwargs (Any) – Keyword initialization arguments.
- Returns:
Newly allocated instance of
cls.- Return type:
Methods#
|
Assign new variables to the JaxDataset, returning a new instance. |
|
Create a copy of the JaxTable, without any validation. |
|
Create a JaxTable from a pandas DataFrame. |
|
Create a JaxTable from a polars DataFrame. |
|
Print a compact summary of fields, shapes, and data types. |
|
Return a schema of the JaxDataset, describing its fields and types. |
|
Convert the JaxDataset to a dictionary of JAX arrays. |
|
Convert the JaxTable to a pandas DataFrame. |
|
Convert the table to a Polars data frame. |
|
Validate dataset fields against the class annotations. |
|
Return a table with deterministic per-row PRNG keys materialized. |
Attributes#
Return the one-dimensional row shape of the table. |