Fixed Pad to support old numpy version.