Skip to main content

ClikaRT::ops::atleast_1d

function

atleast_1d()

Tensor atleast_1d(Tensor x)

x with leading size-1 dims prepended until rank >= 1; a higher-rank input passes through unchanged. Returns a VIEW sharing x's storage (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 >= 1.

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