ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/slice/DoubleSparseSlice.java [78:94]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public DoubleNdArray read(DataBuffer<Double> dst) {
    // set the values in buf to the default, then overwrite with indices/values
    Double[] defaults = new Double[(int) shape().size()];
    Arrays.fill(defaults, getDefaultValue());
    dst.write(defaults);

    AtomicInteger i = new AtomicInteger();
    getIndices()
        .elements(0)
        .forEachIndexed(
            (idx, l) -> {
              long[] coordinates = getIndicesCoordinates(l);
              double value = getValues().getDouble(i.getAndIncrement());
              dst.setObject(value, dimensions.positionOf(coordinates));
            });
    return this;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



ndarray/src/main/java/org/tensorflow/ndarray/impl/sparse/DoubleSparseNdArray.java [312:328]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public DoubleNdArray read(DoubleDataBuffer dst) {
    // set buf to the default values, then overwrite with the indices/values.
    Double[] defaults = new Double[(int) shape().size()];
    Arrays.fill(defaults, getDefaultValue());
    dst.write(defaults);

    AtomicInteger i = new AtomicInteger();
    getIndices()
        .elements(0)
        .forEachIndexed(
            (idx, l) -> {
              long[] coordinates = getIndicesCoordinates(l);
              double value = getValues().getDouble(i.getAndIncrement());
              dst.setObject(value, dimensions.positionOf(coordinates));
            });
    return this;
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



