astropy/astropy — pull request #1446 by astrofrog (2013-10-05 17:35:07+00:00)
Title: Inconsistency in result of comparing unmasked Table column to value

If I compare a numerical column in a Table to a value (e.g. `t['col0'] == 1` where `col0` is numbers) the result is a Column object. If I compare a string column in a Table to a value (e.g. `t['col0'] == 'a'` where `col0` is strings) the result is a numpy `ndarray`.

This specific problem--inconsistency between the returned type based on the data type of the column--does not occur in masked Tables, though there is different bug in that case reported in a separate issue.

The code below reproduces the problem in Anaconda 1.7 and Astropy 0.2.4

```python
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
```