datarray_to_string chokes on str dtype
kwgoodman opened this issue · 3 comments
kwgoodman commented
>> 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
As a workaround perhaps enclose in a try...except and fallback to datarray.str if it fails.
hhuuggoo commented
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