divide_number_by_ratio

mathtools.divide_number_by_ratio(number, ratio)

Divides integer by ratio.

>>> mathtools.divide_number_by_ratio(1, [1, 1, 3])
[Fraction(1, 5), Fraction(1, 5), Fraction(3, 5)]

Divides fraction by ratio:

>>> mathtools.divide_number_by_ratio(Fraction(1), [1, 1, 3])
[Fraction(1, 5), Fraction(1, 5), Fraction(3, 5)]

Divides float by ratio:

>>> mathtools.divide_number_by_ratio(1.0, [1, 1, 3]) 
[0.20000000000000001, 0.20000000000000001, 0.60000000000000009]

Raises type error on nonnumeric number.

Raises type error on noninteger in ratio.

Returns list of fractions or list of floats.