I have a function `f`

that can take matrices of various sizes as inputs. When I try to call it with matrices of size d \times 1, produced by `m[:, k]`

where `k`

is an integer, they get converted to vectors of size d. How to prevent this? This must have been discussed many times but I could not find any solutions. Below is an MWE:

```
function f(x1, x2)
d, n1 = size(x1)
d, n2 = size(x2)
out = zeros(d, n1 * n2)
end
function test()
x1 = randn(2, 3)
x2 = randn(2, 5)
# Works fine
y = f(x1, x2[:, 1:2])
# Does not work
y = f(x1, x2[:, 1])
display(y)
end
test()
```