Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/source/changes/version_0_35_1.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ Fixes
* do not try to display Path objects which point to a file or directory which
does not exist (closes :editor_issue:`317`).

* fixed (Excel) Sheet objects being only partially displayed when
the first value contains a number but other values contain text.

* fixed the mechanism writing warning/error messages happening during the
editor initialization. The errors are now correctly written in the user
TEMP directory / larray-editor-stderr.log
9 changes: 7 additions & 2 deletions larray_editor/arrayadapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1805,8 +1805,11 @@ def open(cls, fpath):
def close(self):
self.data.close()


none_to_empty_string = np.vectorize(lambda v: v if v is not None else '')
# we need to specify otypes explicitly here because otherwise np.vectorize
# will use the type of the first value (e.g. int64) for the resulting array and that breaks if it
# cannot hold subsequent values
none_to_empty_string = np.vectorize(lambda v: v if v is not None else '',
otypes=[object])


@adapter_for('larray.inout.xw_excel.Sheet')
Expand Down Expand Up @@ -2848,6 +2851,8 @@ class PyTablesFileAdapter(AbstractColumnarAdapter):
_COLNAMES = ['Name']

def __init__(self, data, attributes):
if not data.isopen:
raise ValueError('file is already closed')
super().__init__(data=data, attributes=attributes)

def shape2d(self):
Expand Down
Loading