Skip to content

Commit

Permalink
add to_jax entry to the sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed May 19, 2024
1 parent 6eef9b9 commit 1e41760
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions py-polars/docs/source/reference/dataframe/export.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Export DataFrame data to other formats:
DataFrame.to_dict
DataFrame.to_dicts
DataFrame.to_init_repr
DataFrame.to_jax
DataFrame.to_numpy
DataFrame.to_pandas
DataFrame.to_struct
Expand Down
8 changes: 4 additions & 4 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,7 @@ def to_jax(
order: IndexOrder = "fortran",
) -> jax.Array | dict[str, jax.Array]:
"""
Convert DataFrame to a 2D Jax Array, or dict of Jax Arrays.
Convert DataFrame to a Jax Array, or dict of Jax Arrays.
.. versionadded:: 0.20.27
Expand All @@ -1658,7 +1658,7 @@ def to_jax(
Parameters
----------
return_type : {"array", "dict"}
Set return type; a 2D Jax Array, or dict of Jax Arrays.
Set return type; a Jax Array, or dict of Jax Arrays.
device
Specify the jax `Device` on which the array will be created; can provide
a string (such as "cpu", "gpu", or "tpu") in which case the device is
Expand Down Expand Up @@ -1853,7 +1853,7 @@ def to_torch(
dtype: PolarsDataType | None = None,
) -> torch.Tensor | dict[str, torch.Tensor] | PolarsDataset:
"""
Convert DataFrame to a 2D PyTorch Tensor, Dataset, or dict of Tensors.
Convert DataFrame to a PyTorch Tensor, Dataset, or dict of Tensors.
.. versionadded:: 0.20.23
Expand All @@ -1864,7 +1864,7 @@ def to_torch(
Parameters
----------
return_type : {"tensor", "dataset", "dict"}
Set return type; a 2D PyTorch Tensor, PolarsDataset (a frame-specialized
Set return type; a PyTorch Tensor, PolarsDataset (a frame-specialized
TensorDataset), or dict of Tensors.
label
One or more column names, expressions, or selectors that label the feature
Expand Down

0 comments on commit 1e41760

Please sign in to comment.