Skip to content

Instantly share code, notes, and snippets.

@mwcraig
Created September 13, 2013 05:41
Show Gist options
  • Select an option

  • Save mwcraig/6547087 to your computer and use it in GitHub Desktop.

Select an option

Save mwcraig/6547087 to your computer and use it in GitHub Desktop.
Generates astropy issue #1446
from astropy.table import Table
numbers = [1, 2, 3]
strings = ['a', 'b', 'c']
t_numbers = Table(data=[numbers])
comparison_numbers = (t_numbers['col0'] == 1)
type(comparison_numbers) # this is a Column object
print comparison_numbers
t_strings = Table(data=[strings])
comparison_strings = (t_strings['col0'] == 'a')
type(comparison_strings) # this is a numpy ndarray object
print comparison_strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment