(x, pad, axis)
return np.pad(x, pad_widths, mode='constant',
                constant_values=x.dtype.type(0))
Helper for np.pad with 0s for single-axis case.
Helper for np.pad with 0s for single-axis case.
Helper for np . pad with 0s for single - axis case .
def _zero_pad(x, pad, axis):
  """Helper for np.pad with 0s for single-axis case."""
  pad_widths = [(0, 0)] * len(x.shape)
  pad_widths[axis] = pad  # Padding on axis.
  return np.pad(x, pad_widths, mode='constant',
                constant_values=x.dtype.type(0))
def _zero_pad ( x , pad , axis ) : pad_widths = [ ( 0 , 0 ) ] * len ( x . shape ) pad_widths [ axis ] = pad # Padding on axis. return np . pad ( x , pad_widths , mode = 'constant' , constant_values = x . dtype . type ( 0 ) )