fixes for compliance test suite
make reshape more flexible to support zero-padding