mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-07 15:45:04 +08:00
Avoid creating an int64 array
This commit is contained in:
@@ -281,8 +281,8 @@ class Picture(object):
|
||||
if isinstance(color, six.string_types):
|
||||
color = color_dict[color]
|
||||
rgb_size = tuple(size) + (len(color),)
|
||||
color = np.array(color, dtype=np.uint8)
|
||||
array = np.ones(rgb_size, dtype=np.uint8) * color
|
||||
array = array.astype(np.uint8)
|
||||
|
||||
# Force RGBA internally (use max alpha)
|
||||
if array.shape[-1] == 3:
|
||||
|
||||
Reference in New Issue
Block a user