astropy/astropy — pull request #460 by wkerzendorf (2012-11-05 16:29:16+00:00)
Title: Added ducktyping to Table instantiator to read things like HDF5 tables

Given:

`dset = h5py.Table('myfile.h5')`

Before:
`table.Table(dset['mydata'])` would not work.

I just added a ducktyping to check for the existence of the attribute `dtype`. If that exists I convert non-ndarray children via `np.asarray`.

This is also inline with `NDData` that allows HDF5 datasets.