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