---
title: thunder.torch.to_float
canonical: >-
  https://lightning.ai/docs/thunder/stable/api-reference/generated/thunder.torch.to_float
---
# thunder.torch.to_float {#thunder-torch-to-float}

### `thunder.torch.to_float(a)` {#thunder.torch.to_float}

[\[source\]](https://github.com/Lightning-AI/lightning-thunder/blob/0.2.6/thunder/torch/__init__.py#L420-L421)

Return type:

[`Number`](https://docs.python.org/3/library/numbers.html#numbers.Number "(in Python v3.15)") | [`TensorProxy`](/docs/thunder/core/generated/thunder.core.proxies.TensorProxy#thunder.core.proxies.TensorProxy "thunder.core.proxies.TensorProxy")

Parameters:

**a** ([_numbers.Number_](https://docs.python.org/3/library/numbers.html#numbers.Number "(in Python v3.15)") _|_ _thunder.core.proxies.NumberProxy_ _|_ [_thunder.core.proxies.TensorProxy_](/docs/thunder/core/generated/thunder.core.proxies.TensorProxy#thunder.core.proxies.TensorProxy "thunder.core.proxies.TensorProxy")) –

---

**Navigation**

- Parent: [Generated](/docs/thunder/0.2.6/api-reference/generated.md)
