No, that's not possible, at least not in general - to do that, you would
have to at least shift all the elements of the columns after the deleted
one to make the matrix memory layout consistent.
What you can do, if you don't need to use the matrix as an actual matrix,
is to use e.g. a Vector{Vector{Float64}} instead of a Matrix{Float64}. That
gives you a vector of columns with which you can add and delete columns at
will. However, it will be much more expensive to address this data
structure by rows, since you will lose cache-locality.
// T
On Sunday, September 6, 2015 at 11:29:39 PM UTC+2, Diego Javier Zea wrote:
>
> Is there some function for deleting columns in-place? I want to do
> something like the next, but changing the matrix in-place.
>
> julia> mat = [ 1 2 3
> 4 5 6 ]
> 2x3 Array{Int64,2}:
> 1 2 3
> 4 5 6
>
> julia> mat[:, [true, false, true]]
> 2x2 Array{Int64,2}:
> 1 3
> 4 6
>
>
> Thanks in advance!
>