We need to add shape checks to inputs. This is a much needed enhancement to avoid salient bugs in metrics computations.