Skip to content

Commit 32472ad

Browse files
committed
using last
1 parent 6be6284 commit 32472ad

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • wolframclient/serializers/wxfencoder

wolframclient/serializers/wxfencoder/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
)
1010
from wolframclient.utils import six
1111
from wolframclient.utils.datastructures import Settings
12+
from wolframclient.utils.functional import last
1213

1314
if six.JYTHON:
1415
import jarray
@@ -142,7 +143,7 @@ def array_to_list(data, dimensions, wl_type):
142143

143144

144145
if hasattr(memoryview, "cast"):
145-
unpack_mapping = Settings((k, v.format[1:]) for k, v in STRUCT_MAPPING.items())
146+
unpack_mapping = Settings((k, last(v.format)) for k, v in STRUCT_MAPPING.items())
146147

147148
def _to_complex(array, max_depth, curr_depth):
148149
# recursivelly traverse the array until the last (real) dimension is reached

0 commit comments

Comments
 (0)