Commit f8ea6d5a authored by Anthony Larcher's avatar Anthony Larcher
Browse files

new size of string in hdf5

parent 670c7209
......@@ -340,8 +340,8 @@ class IdMap:
# if running python 3, need a conversion to unicode
if sys.version_info[0] == 3:
self.leftids = self.leftids.astype('U', copy=False)
self.rightids = self.rightids.astype('U', copy=False)
self.leftids = self.leftids.astype('U100', copy=False)
self.rightids = self.rightids.astype('U100', copy=False)
tmpstart = f.get("start").value
tmpstop = f.get("stop").value
......
......@@ -304,8 +304,8 @@ class Key:
# if running python 3, need a conversion to unicode
if sys.version_info[0] == 3:
self.modelset = self.modelset.astype('U', copy=False)
self.segset = self.segset.astype('U', copy=False)
self.modelset = self.modelset.astype('U100', copy=False)
self.segset = self.segset.astype('U100', copy=False)
trialmask = f.get("trial_mask").value
self.tar = (trialmask == 1)
......
......@@ -255,8 +255,8 @@ class Ndx:
# if running python 3, need a conversion to unicode
if sys.version_info[0] == 3:
self.modelset = self.modelset.astype('U', copy=False)
self.segset = self.segset.astype('U', copy=False)
self.modelset = self.modelset.astype('U100', copy=False)
self.segset = self.segset.astype('U100', copy=False)
self.trialmask = f.get("trial_mask").value.astype('bool')
......
......@@ -203,8 +203,7 @@ class Scores:
:param ndx: a Key or Ndx object
:return: resized version of the current Scores object to size of \'ndx\'
and reordered according to the ordering of modelset and
segset in \'ndx\'.
and reordered according to the ordering of modelset and segset in \'ndx\'.
"""
aligned_scr = Scores()
aligned_scr.modelset = ndx.modelset
......@@ -293,7 +292,7 @@ class Scores:
:param modlist: a list of strings which will be compared with
the modelset of the current Scores object.
:param seglist: a list of strings which will be compared with
:param seglist: a list of strings which will be compared with
the segset of \'inscr\'.
:param keep: a boolean indicating whether modlist and seglist are the
models to keep or discard.
......@@ -370,11 +369,11 @@ class Scores:
self.modelset = np.empty(f["/ID/row_ids"].shape, dtype=f["/ID/row_ids"].dtype)
f["modelset"].read_direct(self.modelset)
self.modelset = self.modelset.astype('U', copy=False)
self.modelset = self.modelset.astype('U100', copy=False)
self.segset = np.empty(f["/ID/column_ids"].shape, dtype=f["/ID/column_ids"].dtype)
f["segset"].read_direct(self.segset)
self.segset = self.segset.astype('U', copy=False)
self.segset = self.segset.astype('U100', copy=False)
self.scoremask = np.empty(f["score_mask"].shape, dtype=f["score_mask"].dtype)
f["score_mask"].read_direct(self.scoremask)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment