(X, inds0, inds1)
return tf.gather(Xflat, inds0 * ncols + inds1)
like numpy X[inds0, inds1]
    XXX this implementation is bad
like numpy X[inds0, inds1]
    XXX this implementation is bad
like numpy X [ inds0 inds1 ] XXX this implementation is bad
def fancy_slice_2d(X, inds0, inds1):
    """
    like numpy X[inds0, inds1]
    XXX this implementation is bad
    """
    inds0 = tf.cast(inds0, tf.int64)
    inds1 = tf.cast(inds1, tf.int64)
    shape = tf.cast(tf.shape(X), tf.int64)
    ncols = shape[1]
    Xflat = tf.reshape(X, [-1])
    return tf.gather(Xflat, inds0 * ncols + inds1)
def fancy_slice_2d ( X , inds0 , inds1 ) : inds0 = tf . cast ( inds0 , tf . int64 ) inds1 = tf . cast ( inds1 , tf . int64 ) shape = tf . cast ( tf . shape ( X ) , tf . int64 ) ncols = shape [ 1 ] Xflat = tf . reshape ( X , [ - 1 ] ) return tf . gather ( Xflat , inds0 * ncols + inds1 )