How to delete zeros from matrix delete and delete! does not work?
Letās say you have:
[1 0 1;
0 1 1;
0 0 1]
What do you want the result of ādelete zerosā to be?
Just in case youāre talking about sparse matrices, then the functions youāre looking for are dropzeros() and dropzeros!().
in what packgate is because it doesn;t work?
пон, 28. Š¾ŠŗŃ 2019. Ń 17:13 Jamie via JuliaLang julialang@discoursemail.com ŃŠµ Š½Š°ŠæŠøŃŠ°Š¾/ла:
If dropzeros doesnāt work then it wonāt be applicable to your case ā it only applies to SparseArrays.
Probably what you want is something like filter(!iszero, A), which will return all nonzero elements as a vector⦠but you could also reasonably want all rows without any nonzeros, or all rows that arenāt all nonzero, or ā¦, or ā¦
We need a bit more to go on ![]()