# Data Types

Magnetron currently supports the following data types, with additional types planned for the future. Support for **bfloat16** (Google Brain Floating Point 16) is actively under development.

|   DType | Type               | Size (bits) | Min value         | Max value        |
|--------:|--------------------|------------:|-------------------|------------------|
| float16 | Floating point     |          16 | $\approx -6.5e4$  | $\approx 6.5e4$  |
| float32 | Floating point     |          32 | $\approx -3.4e38$ | $\approx 3.4e38$ |
| boolean | Boolean            |           8 | $0$               | $1$              |
|    int8 | Integer (signed)   |           8 | $-2^{7}$          | $2^{7}-1$        |
|   uint8 | Integer (unsigned) |           8 | $0$               | $2^{8}-1$        |
|   int16 | Integer (signed)   |          16 | $-2^{15}$         | $2^{15}-1$       |
|  uint16 | Integer (unsigned) |          16 | $0$               | $2^{16}-1$       |
|   int32 | Integer (signed)   |          32 | $-2^{31}$         | $2^{31}-1$       |
|  uint32 | Integer (unsigned) |          32 | $0$               | $2^{32}-1$       |
|   int64 | Integer (signed)   |          64 | $-2^{63}$         | $2^{63}-1$       |
|  uint64 | Integer (unsigned) |          64 | $0$               | $2^{64}-1$       |

### Examples

Create a `float16` tensor filled with zeros:
```python
Tensor.zeros(10, dtype=dtype.float16)
```

Create a 2×3 `float32` tensor filled with ones:
```python
Tensor.ones(2, 3, dtype=dtype.float32)
```

Create a range tensor of integers from 0 to 9:
```python
Tensor.arange(0, 10, dtype=dtype.int64)
```