### Question:
CudaFloatDataBuffer extends BaseCudaDataBuffer { @Override public double getDouble(long i) { return super.getFloat(i); } 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 getDouble() throws Exception { DataBuffer buffer = Nd4j.createBuffer(new float[]{1f,2f,3f,4f}); assertEquals("CudaFloatDataBuffer", buffer.getClass().getSimpleName()); System.out.println("Starting check..."); assertEquals(1.0f, buffer.getFloat(0), 0.001f); assertEquals(2.0f, buffer.getFloat(1), 0.001f); assertEquals(3.0f, buffer.getFloat(2), 0.001f); assertEquals(4.0f, buffer.getFloat(3), 0.001f); System.out.println("Data: " + buffer); }
@Test public void testOffsets() throws Exception { DataBuffer create = Nd4j.createBuffer(new double[]{1,2,3,4},2); assertEquals(2,create.length()); assertEquals(4,create.underlyingLength()); assertEquals(2,create.offset()); assertEquals(3,create.getDouble(0),1e-1); assertEquals(4,create.getDouble(1),1e-1); }