ecl-logo Documentation

ExpandDimensions

ExpandDimensions[full,partial]out

expands dimensions of partial to match dimensions of full.

Details

  • Expands dimensions by padding right with last element of corresponding dimension of 'partial'.
  • Input
    Output

Examples

Basic Examples  (5)

Repeat a single element to fill the list:

Pad right with last element Y:

Does nothing because the dimensions already match:

Repeat a single element to match a more complicated pattern:

Pad right with last element: