mirror of
https://github.com/wassname/scikit-image.git
synced 2026-10-03 12:50:25 +08:00
Simplify indexing
This commit is contained in:
1 parent
72c1f6855a
commit
e83003c45d
1 file changed
+1
-2
@@ -448,8 +448,7 @@ class Picture(object):
|
||||
if isinstance(value, tuple):
|
||||
self[key].rgb = value
|
||||
elif isinstance(value, PixelGroup):
|
||||
src_key = self[key]._key
|
||||
self.array[src_key] = value._array
|
||||
self.array[key[::-1]] = value._array
|
||||
else:
|
||||
raise TypeError("Invalid value type")
|
||||
self._array_modified()
|
||||
|
||||
Reference in new issue
Block a user