Created
September 13, 2013 05:41
-
-
Save mwcraig/6547087 to your computer and use it in GitHub Desktop.
Generates astropy issue #1446
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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