I want to do something like this. Let\'s say we have a tensor A.
A = [[1,0],[0,4]]
And I want to get nonzero values and their indices fro
#assume that an array has 0, 3.069711, 3.167817. mask = tf.greater(array, 0) non_zero_array = tf.boolean_mask(array, mask)