Drop Column with the most zeros

0
easy
by William S.

In this exercise, you will be given a two-dimensional tensor. You need to remove the column with the most 0 values. You can assume that only one column will have the maximum number of 0 values. It's guaranteed that there is only one column with the maximum number of zeros, and the input tensor has at least two columns.

Examples:

1
0
3
4
5
6
1
3
4
6
1
0
0
0
5
0
1
0
0
5

Loading...
2024 © TensorGym
Contrinbute | Contact | Copyright | 𝕏