a # 1 60 R ' z#p pad x ' a # a,[1] ' z#(((z=0)+Xz#zYp)X(zY1,Rx)+|(z#_1SRRx)Yp)Yx ' a # a,[1] ' $0 ' a # a,[1] '"pad - pads arrays with blanks or zeros ' a # a,[1] '"from ''the apl handbook of techniques'' copyright 1978, ibm. ' a # a,[1] '"-pads array x with blanks (if literal) or zeros (if ' a # a,[1] '" numeric). x can be an array of any shape and type. p is a ' a # a,[1] '" numeric vector specifying the amount of padding in each ' a # a,[1] '" dimension of x (or the lawst Rp). ' a # a,[1] '"-the sense of padding (right or left), (bottom or top), ' a # a,[1] '" etc., is determined by the signs of the elements of p just' a # a,[1] '" as with the take function (Y). if p is not long enough to' a # a,[1] '" match the rank of x, padding is done only for the last Rp ' a # a,[1] '" dimensions. this function is unlike the take function in ' a # a,[1] '" that the change in size is specified and it does not ' a # a,[1] '" required detailed knowledge of the dimensions of x. ' Lfx a