BIDS / datarray

Prototyping numpy arrays with named axes for data management.
http://bids.github.com/datarray
Other
87 stars 20 forks source link

datetime.date ticks not handled by datarray_to_string #34

Closed kwgoodman closed 13 years ago

kwgoodman commented 13 years ago
>> from datarray.datarray import DataArray 
>> from datarray.print_grid import datarray_to_string

Good:

>> print datarray_to_string(DataArray([[1,2],[3,4]], [('row', ('a', 'b')),('col', ('c', 'd'))]))
row       col                
--------- -------------------
          c         d        
a                 1         2
b                 3         4

Should datetime.date tick be printed as its string?

>> from datetime import date as D
>> print datarray_to_string(DataArray([[1,2],[3,4]], [('row', ('a', D(2010,1,1))),('col', ('c',   'd'))]))
row       col                
--------- -------------------
          c         d        
a                 1         2
<9         3         4
terhorst commented 13 years ago

Fixed in b7af9f1