gsiplain function

Internal function: Convert to plain vector or matrix