dimension

Spin.dimension: int

Dimension, it is 2 for spin-1/2, 3 for spin-1, and so on.