polars.Series.to_jax
-
Convert this Series to a Jax Array.
Added in version 0.20.27.
Warning
This functionality is currently considered unstable. It may be changed at any point without it being considered a breaking change.
- Parameters:
-
- device
-
Specify the jax
Deviceon which the array will be created; can provide a string (such as “cpu”, “gpu”, or “tpu”) in which case the device is retrieved asjax.devices(string)[0]. For more specific control you can supply the instantiatedDevicedirectly. If None, arrays are created on the default device.
Examples
>>> s = pl.Series("x", [10.5, 0.0, -10.0, 5.5]) >>> s.to_jax() Array([ 10.5, 0. , -10. , 5.5], dtype=float32)
Series.to_jax(
device: jax.Device | str_ | None = None,
) → jax.Array
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/series/api/polars.Series.to_jax.html