Created
September 13, 2013 05:42
-
-
Save mwcraig/6547090 to your computer and use it in GitHub Desktop.
Generates astropy issue #1447
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_mask_numbers = Table(data=[numbers], masked=True) | |
comparison_numbers_masked = (t_mask_numbers['col0'] == 1) | |
type(comparison_numbers_masked) # this is a MaskedColumn object | |
comparison_numbers_masked # that causes an error on display... | |
print (comparison_numbers_masked) # ...but can be printed! | |
t_mask_strings = Table(data=[strings], masked=True) | |
comparison_strings_masked = (t_mask_strings['col0'] == 'a') | |
type(comparison_strings_masked) # this is a MaskedColumn object | |
comparison_strings_masked # that can be displayed... | |
print (comparison_strings_masked) # ...but not printed! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment