Open
Description
>>> scalar_arr = where(True, 5, 10)
>>> arr = stack({'a': scalar_arr, 'b': 'a'}, 'test')
>>> with open_excel() as wb:
>>> wb[0] = arr.dump()
TypeError: Objects for SAFEARRAYS must be sequences (of sequences), or a buffer object.
Unsure where this should be fixed though. In Array.dump() (there is already some code in there trying to fix this kind of issues but for other numpy types)? in xw_excel.Sheet.__setitem__
? in xlwings? in stack() (but see below for a way to create the array without stack)?
See note at https://github.com/larray-project/larray/blob/master/larray/core/array.py#L2500 for a discussion about this.
>>> scalar_arr = where(True, 5, 10)
>>> arr = full(1, None, dtype=object)
>>> arr[0] = scalar_arr