(x, pad, axis)
return jnp.pad(x, pad_widths, mode='constant')
Helper for jnp.pad with 0s for single-axis case.
Helper for jnp.pad with 0s for single-axis case.
Helper for jnp . pad with 0s for single - axis case .
def _zero_pad(x, pad, axis):  # pylint: disable = invalid-name
  """Helper for jnp.pad with 0s for single-axis case."""
  pad_widths = [(0, 0)] * len(x.shape)
  pad_widths[axis] = pad  # Padding on axis.
  return jnp.pad(x, pad_widths, mode='constant')
def _zero_pad ( x , pad , axis ) : # pylint: disable = invalid-name pad_widths = [ ( 0 , 0 ) ] * len ( x . shape ) pad_widths [ axis ] = pad # Padding on axis. return jnp . pad ( x , pad_widths , mode = 'constant' )