`sizeOf` sounds ambiguous to me, probably `dimensionsOf` would make more sense in for this function.