Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageView.__str__ fails when viewing class labels without image data #27

Closed
tboggs opened this issue Jun 5, 2015 · 0 comments
Closed
Labels

Comments

@tboggs
Copy link
Member

tboggs commented Jun 5, 2015

ImageView.__str__ prints the bands element of the RGB metadata; however, this metadata element is not present if class labels are being viewed without an associated image data array. For example:

>>> v = spy.imshow(classes=gt)
>>> v
/home/thomas/src/spectral/spectral/graphics/spypylab.pyc in __str__(self)
   1117         meta = self.data_rgb_meta
   1118         s = 'ImageView object:\n'
-> 1119         s += '  {0:<20}:  {1}\n'.format("Display bands", meta['bands'])
   1120         if self.interpolation == None:
   1121             interp = "<default>"

KeyError: u'bands'
@tboggs tboggs added the bug label Jun 5, 2015
@tboggs tboggs closed this as completed in ca619c0 Jun 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant