Fixed 2D vector conversion by switching ndims() to size() and updated doc example to match code.