esheldon/fitsio — pull request #9 by rainwoodman (2013-06-28 16:31:21+00:00)
Title: Some improvements

Trying to read the SDSS spectra files with fitsio and noticed a few weirdness:

The DR10 Spectra's doesn't have Z_PERSON. But in the repr of fits[2]['Z_PERSON']
I see subcolumn 'Z'.
The first commit fixes this. Is is because when ColumnSubset.columns is scalar and improperly handled.

The second commit fixes a core dump when I run
fits[2]['CLASS_PERSON']['CLASS'][:]
It is because when the target is a scalar, strides is NULL and PyArray_STRIDE, core dumps. The fact that array is a numpy scalar is probably also worrisome; but with this modification the code gives the correct result 'QSO' without core dumps.

Another commit disables printing to stdout. Because printing to stdout from a library will mess up with regular outputs from the programs using the library. issuing python warnings might be more appropriate.

Another commit disables explicit relative imports. Python by default looks for modules in . first, thus there is no need to explicitly declear '.' in the imports.