[AstroPy] Vector Quantities in QTable

Jeffrey Brent McBeth mcbeth at broggs.org
Thu Apr 13 16:29:16 EDT 2017


On Thu, Apr 13, 2017 at 11:25:39AM -0700, Michael Walther wrote:
> Hi Jeffrey,
> 
> Exchange:
> foo = QTable(names=('state1','mass'),dtype=('(3,1)f8','f8'))
> by:
> foo = QTable(names=('state1','mass'),dtype=('(3,)f8','f8'))
> 
> Then it works (at least for this simplified case).

I'm sorry, I cannot reproduce the code working with your substitution.
Both forms work fine (3,1), (3,) if I do not specify the units of the column
Well, I say fine, except the units are stripped off the data and are not preserved in the QTable

If I have the unit definitions before trying to add a row, then I'm back to where I was.

I have astropy 1.3.2 and I've tried on python 2.7.12 and 3.5.2.

Thanks,
 Jeffrey
-- 
"The man who does not read good books has no advantage over 
 the man who cannot read them."
 -- not Mark Twain, maybe a southen librarian in 1910



More information about the AstroPy mailing list