mathtools.partition_integer_into_units — Abjad v1.1.1 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »

# mathtools.partition_integer_into_units

`abjad.tools.mathtools.` `partition_integer_into_units`(n)

  Partition integer n into n equal parts.

  Partition positive n into parts all equal to `1`:

      abjad> mathtools.partition_integer_into_units(6)
      [1, 1, 1, 1, 1, 1]

  Partition negative n into parts all equal to `-1`:

      abjad> mathtools.partition_integer_into_units(-5)
      [-1, -1, -1, -1, -1]

  Return empty list when n is `0`:

      abjad> mathtools.partition_integer_into_units(0)
      []

  Raise `TypeError` on noninteger n:

      abjad> mathtools.partition_integer_into_units(7.5)
      TypeError

### Navigation

- index
- modules |
- next |
- previous |
- Project Abjad »
- Abjad v1.1.1 documentation »
- Abjad API »