xpad

Defined in xtensor/xpad.hpp

enum xt::pad_mode

Defines different algorithms to be used in xt::pad

Values:

constant
symmetric
periodic
template<class E, class S = typename std::decay_t<E>::size_type, class V = typename std::decay_t<E>::value_type>
auto xt::pad(E &&e, const std::vector<std::vector<S>> &pad_width, pad_mode mode = pad_mode::constant, V constant_value = 0)

Pad an array.

Return

The padded array.

Parameters
  • e: The array.

  • pad_width: Number of values padded to the edges of each axis: {{before_1, after_1}, ..., {before_N, after_N}}.

  • mode: The type of algorithm to use. [default: xt::pad_mode::constant].

  • constant_value: The value to set the padded values for each axis (used in xt::pad_mode::constant).

template<class E, class S = typename std::decay_t<E>::size_type, class V = typename std::decay_t<E>::value_type>
auto xt::pad(E &&e, const std::vector<S> &pad_width, pad_mode mode = pad_mode::constant, V constant_value = 0)

Pad an array.

Return

The padded array.

Parameters
  • e: The array.

  • pad_width: Number of values padded to the edges of each axis: {before, after}.

  • mode: The type of algorithm to use. [default: xt::pad_mode::constant].

  • constant_value: The value to set the padded values for each axis (used in xt::pad_mode::constant).

template<class E, class S = typename std::decay_t<E>::size_type, class V = typename std::decay_t<E>::value_type>
auto xt::pad(E &&e, S pad_width, pad_mode mode = pad_mode::constant, V constant_value = 0)

Pad an array.

Return

The padded array.

Parameters
  • e: The array.

  • pad_width: Number of values padded to the edges of each axis.

  • mode: The type of algorithm to use. [default: xt::pad_mode::constant].

  • constant_value: The value to set the padded values for each axis (used in xt::pad_mode::constant).