Miscellaneous functions.
Misc
Miscellaneous helpful functions.
- torch_tools.misc.divides_by_two_check(to_divide: int)[source]
Make sure
to_divide
can be divided by 2.- Parameters:
to_divide (int) – A number to be divided by two.
- Raises:
TypeError – If
to_divide
is not an int.ValueError – If
to_divide
is not greater than zero.ValueError – If
to_divide / 2
is irrational.