Add exceptions to ensure the dimensions and to test a zero size for a bin