Skip to content

Commit

Permalink
[tag] change count behaviour to match nix
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrewe authored and achilleas-k committed Oct 31, 2018
1 parent 779ee10 commit cca977c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixio/pycore/tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,12 @@ def _get_offset_and_count(self, data):
unit = self.units[idx]
else:
unit = None
o = self._pos_to_idx(position[idx], unit, dim)
o = self._pos_to_idx(pos, unit, dim)
offset.append(o)
if idx < len(extent):
ext = extent[idx]
c = self._pos_to_idx(pos + ext, unit, dim) - o
count.append(c if c > 1 else 1)
count.append(c + 1 if c >= 1 else 1)
else:
count.append(1)
return tuple(offset), tuple(count)
Expand Down

0 comments on commit cca977c

Please sign in to comment.