### Question:
CudaFloatDataBuffer extends BaseCudaDataBuffer { @Override public double[] asDouble() { return ArrayUtil.toDoubles(asFloat()); } CudaFloatDataBuffer(Pointer pointer, Indexer indexer, long length);  CudaFloatDataBuffer(long length);  CudaFloatDataBuffer(long length, boolean initialize);  CudaFloatDataBuffer(long length, boolean initialize, MemoryWorkspace workspace);  CudaFloatDataBuffer(long length, int elementSize);  CudaFloatDataBuffer(long length, int elementSize, long offset);  CudaFloatDataBuffer(DataBuffer underlyingBuffer, long length, long offset);  CudaFloatDataBuffer(float[] buffer);  CudaFloatDataBuffer(float[] data, boolean copy);  CudaFloatDataBuffer(float[] data, boolean copy, MemoryWorkspace workspace);  CudaFloatDataBuffer(float[] data, boolean copy, long offset);  CudaFloatDataBuffer(float[] data, boolean copy, long offset, MemoryWorkspace workspace);  CudaFloatDataBuffer(double[] data);  CudaFloatDataBuffer(double[] data, boolean copy);  CudaFloatDataBuffer(double[] data, boolean copy, long offset);  CudaFloatDataBuffer(int[] data);  CudaFloatDataBuffer(int[] data, boolean copy);  CudaFloatDataBuffer(int[] data, boolean copy, long offset);  CudaFloatDataBuffer(byte[] data, long length);  CudaFloatDataBuffer(ByteBuffer buffer, long length);  CudaFloatDataBuffer(ByteBuffer buffer, long length, long offset); @Override void assign(long[] indices, float[] data, boolean contiguous, long inc); @Override void assign(long[] indices, double[] data, boolean contiguous, long inc); @Override double[] getDoublesAt(long offset, long inc, int length); @Override void setData(int[] data); @Override void setData(double[] data); @Override byte[] asBytes(); @Override Type dataType(); @Override double[] asDouble(); @Override int[] asInt(); @Override double getDouble(long i); @Override DataBuffer create(double[] data); @Override DataBuffer create(float[] data); @Override DataBuffer create(int[] data); @Override void flush();  }### Answer:
@Test public void testDup2() throws Exception { INDArray array = Nd4j.linspace(0,99, 100).reshape(10, 10); INDArray slice1 = array.slice(2); assertEquals(10, slice1.length()); INDArray duplicate = slice1.dup(); assertEquals(10, duplicate.length()); assertEquals(10, duplicate.data().length()); assertEquals(10, duplicate.data().asDouble().length); assertEquals(20f, duplicate.getFloat(0), 0.0001f); assertEquals(21f, duplicate.getFloat(1), 0.0001f); assertEquals(22f, duplicate.getFloat(2), 0.0001f); assertEquals(23f, duplicate.getFloat(3), 0.0001f); }