partition_integer_into_units

mathtools.partition_integer_into_units(n)

Partitions positive integer into units:

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

Partitions negative integer into units:

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

Partitions 0 into units:

>>> mathtools.partition_integer_into_units(0)
[]

Returns list of zero or more parts with absolute value equal to 1.