def narray_simple_read(start_indexes, end_indexes)
      nd = dataspace.ndims
      raise ArgumentError.new("start_indexes and end_indexes must be of size ndims") unless start_indexes.size == nd and end_indexes.size == nd
      szs = dataspace.dims
      counts = end_indexes.zip(start_indexes.zip(szs)).map{|ei, (si, sz)| ei < 0 ? ei + sz - si + 1 : ei - si + 1}
      dtspce = H5Dataspace.create_simple(counts)
      dtspce.offset_simple(start_indexes)
      narr = NArray.send(narray_type, *dtspce.dims.reverse) # Note narray is fortran-style column major
      basic_read(@id, datatype.id, 0, dtspce.id, 0, narr.ffi_pointer)
      narr
    end
def narray_simple_read(start_indexes, end_indexes)
      nd = dataspace.ndims
      raise ArgumentError.new("start_indexes and end_indexes must be of size ndims") unless start_indexes.size == nd and end_indexes.size == nd
      szs = dataspace.dims
      counts = end_indexes.zip(start_indexes.zip(szs)).map{|ei, (si, sz)| ei < 0 ? ei + sz - si + 1 : ei - si + 1}
      dtspce = H5Dataspace.create_simple(counts)
      dtspce.offset_simple(start_indexes)
      narr = NArray.send(narray_type, *dtspce.dims.reverse) # Note narray is fortran-style column major
      basic_read(@id, datatype.id, 0, dtspce.id, 0, narr.ffi_pointer)
      narr
    end
Create an NArray of the appropriate type and size and a subsection of
 the dataset into it. start_indexes and end_indexes should be arrays
 of size ndims. start_indexes should contain the (zero-based) offset
 of the start of the read, and end_indexes should contain the offset of
 the end of the read. Each element of end_indexes can either be a zero
 based positive offset, or a negative offset where -1 corresponds to the
 end of the dataset dimension. This function will not work for complicated
 datatypes (basically only works for ints, floats and complexes, where a datatype
 composed of two floats is assumed to be a complex). There is
 scope in the future for writing custom closures for reading in more
 complex datatypes.
 As an example, consider a two-dimensional 6x10 dataset.
   dataset.narray_read([0,0], [-1,-1]) # would read the whole of the dataset
   dataset.narray_read([0,0], [5,9]) # would read the whole of the dataset
   dataset.narray_read([0,0], [2,-1]) # would read half the dataset
   dataset.narray_read([0,0], [-4,-1]) # would read the same half of the dataset
   dataset.narray_read([2,4], [2,4]) # would read one element of the dataset