Skip to content

Commit 7365093

Browse files
committed
short dtype is now optional - both i1 & int8 are supported
1 parent d9dc593 commit 7365093

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/image/convert_b64.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import numpy
33
import base64
44

5-
plotlyjsTypes = {
5+
plotlyjsShortTypes = {
66
'int8': 'i1',
77
'uint8': 'u1',
88
'int16': 'i2',
@@ -89,9 +89,9 @@ def arraysToB64(obj, newObj) :
8989

9090
arr = arr.astype(numpy.uint32)
9191

92-
if str(arr.dtype) in plotlyjsTypes :
92+
if str(arr.dtype) in plotlyjsShortTypes :
9393
newObj[key] = {
94-
'dtype': plotlyjsTypes[str(arr.dtype)],
94+
'dtype': plotlyjsShortTypes[str(arr.dtype)],
9595
'bdata': base64.b64encode(arr).decode('ascii')
9696
}
9797

0 commit comments

Comments
 (0)