owl
owl copied to clipboard
Mat.flatten does not return a Mat.mat
Mat.flatten returns a one-dimensional ndarray, so using Mat operations on it fails with a "wrong number of indices" error.
Hi @jfeser , I think the idea of flatten is to mimic numpy.flatten, which returns a 1D ndarray.
Implementation-wise, flatten is just a simple wrapper around. Maybe you can try Mat.(reshape x [|1; numel x|])? Would that be acceptable?