Skip to content

Commit cf84aeb

Browse files
authored
Update graphics.py (#127)
Generally, the variable "bands" is an array, and the "not" judgment does not apply to arrays (Use "any()" or "all()" operation for array judgment). The "not" judgment should be corrected to "is" judgment to solve this compatibility problem.
1 parent e886e4d commit cf84aeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spectral/graphics/graphics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ def get_rgb_meta(source, bands=None, **kwargs):
537537
if k not in _get_rgb_kwargs:
538538
raise ValueError('Invalid keyword: {0}'.format(k))
539539

540-
if not bands:
540+
if bands is None:
541541
bands = []
542542
if len(bands) not in (0, 1, 3):
543543
raise Exception("Invalid number of bands specified.")

0 commit comments

Comments
 (0)