BIDS / datarray

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

datarray_to_string chokes on str dtype #35

Closed kwgoodman closed 13 years ago

kwgoodman commented 13 years ago
>> DataArray(['a'])
DataArray(['a'], 
      dtype='|S1')
(None,)

>> print datarray_to_string(DataArray(['a']))
<snip>
TypeError: unbound method max_width() must be called with StrFormatter instance as first argument (got nothing instead)
kwgoodman commented 13 years ago

As a workaround perhaps enclose in a try...except and fallback to datarray.str if it fails.

hhuuggoo commented 13 years ago

seems like the bug is get_formatter in print_grid returning StrFormatter(the type) instead of an instance, I'm goign to update the bugfix tests and do submit a pull request

terhorst commented 13 years ago

Fixed in d304a73