Skip to content

Commit

Permalink
Removing separator in intervalset
Browse files Browse the repository at this point in the history
  • Loading branch information
gviejo committed Dec 5, 2024
1 parent ef34bb6 commit 257c7b0
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions pynapple/core/interval_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,23 +307,18 @@ def __repr__(self):

headers = ["index", "start", "end"]
if len(col_names):
headers += [""] + [c for c in col_names]
headers += [c for c in col_names]
bottom = f"shape: {self.shape}, time unit: sec."

# We rarely want to print everything as it can be very big.
if len(self) > max_rows:
n_rows = max_rows // 2
if len(col_names):
separator = np.array([["|"] * n_rows]).T
else:
separator = np.empty((n_rows, 0))
data = np.vstack(
(
np.hstack(
(
self.index[0:n_rows, None],
self.values[0:n_rows],
separator,
_convert_iter_to_str(metadata.values[0:n_rows]),
),
dtype=object,
Expand All @@ -333,23 +328,17 @@ def __repr__(self):
(
self.index[-n_rows:, None],
self.values[0:n_rows],
separator,
_convert_iter_to_str(metadata.values[-n_rows:]),
),
dtype=object,
),
)
)
else:
if len(col_names):
separator = np.array([["|"] * len(self)]).T
else:
separator = np.empty((len(self), 0))
data = np.hstack(
(
self.index[:, None],
self.values,
separator,
_convert_iter_to_str(metadata.values),
),
dtype=object,
Expand Down

0 comments on commit 257c7b0

Please sign in to comment.