timholy/HDF5.jl — pull request #33 by ggggggggg (2013-08-22 01:22:12+00:00)
Title: Added support for extendable dimensions

FYI This is my first time using github, and first contribution to julia. That said, this wasn't too hard, and seems to work.

added ```h5d_set_dimensions```, which is exported as ```set_dims!```

```dataspace``` now takes a keyword argument for maximum dims under a few constructions, the default behavior is unchanged

```d_create``` can accept dtype as a julia type and call ```HDF5Datatype``` on it
d_create can accept dims or a tuple (dims, max_dims) in place of a dataspace

```get_dims``` can accept a dataset in addition to a dataspace

I added a bit of documentation, and a small test file.

Also while working on this I noticed a few odd behaviors, summarized below. Should I submit them as issues? I tried to fix the ```b[:]``` one by defining and exporting ```endof(dset:HDF5Dataset) = length(dset)```, but it kept throwing the exact same error.

```julia
using HDF5

fid = h5open("test.h5", "w")
d = d_create(fid, "foo", datatype(Float64), ((10,20),(100,200)), "chunk", (1,1))
# d[1,1]=4 # Segmentation fault: 11
b = d_create(fid, "b", Int, ((1000,),(-1,)), "chunk", (100,)) #-1 is equivalent to typemax(Hsize) as far as I can tell
# b[:] # ERROR: no method endof(HDF5Dataset{PlainHDF5File},)
```