Skip to main content

ClikaRT::ops::atleast_2d

function

atleast_2d()

Tensor atleast_2d(Tensor x)

x with leading size-1 dims prepended until rank >= 2 (see atleast_1d). Returns a view (no copy).

Throws

  • ClikaRT::Error: when the input's dtype is not served for this operation (the machine-readable reason rides code_name()).

Returns: a view of x with rank >= 2.

Declared in ClikaRT/compute/ops.h, line 3083