nltools icon indicating copy to clipboard operation
nltools copied to clipboard

Fix bug where Adjacency can't load .h5 file using a Path object

Open ejolly opened this issue 4 years ago • 0 comments
trafficstars

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-62-2af95153a257> in <module>
----> 1 Adjacency((adjs[ep_num]))

~/Documents/pypackages/nltools/nltools/data/adjacency.py in __init__(self, data, Y, matrix_type, labels, **kwargs)
    115             self.is_single_matrix = False
    116         elif (isinstance(data, str) or isinstance(data, Path)) and (
--> 117             (".h5" in data) or (".hdf5" in data)
    118         ):
    119             f = dd.io.load(data)

TypeError: argument of type 'PosixPath' is not iterable

ejolly avatar Mar 30 '21 19:03 ejolly