biocore/biom-format — pull request #347 by wasade (2014-05-09 16:47:43+00:00)
Title: API: Table constructor will attempt to_sparse if data do not look sparse

Addresses an item in #319. This got _slightly_ weird, for this reason:

```python
>>> data = array([])
>>> data.shape
(0,)
>>> coo_matrix(data, shape=data.shape).shape
(1, 0)
>>> coo_matrix((0,0), dtype=dtype).shape
(0, 0)
```

The second call isn't actually setting a shape, but it does result in an empty matrix, which is what is expected if passed as input the empty case. Similar for the empty matrix:

```python
>>> array([[]]).shape
(1, 0)
```

While that is valid, and is empty as there aren't any columns, it is misleading for code that examines shape and assumes it should correspond to IDs or metadata.