```python
import numpy as np
v1 = py5.Py5Vector.from_heading(py5.radians(45))
print(v1)
# Py5Vector2D(0.70710678, 0.70710678)
v2 = py5.Py5Vector.from_heading(py5.radians(90), py5.radians(45), dtype=np.float16)
print(v2)
# Py5Vector3D(0.707, 0.707, 0.)
v3 = py5.Py5Vector.from_heading(py5.radians(90), py5.radians(45), py5.radians(45), dtype=np.float16)
print(v3)
# Py5Vector4D(0., 0.707, 0.5, 0.5)
```