Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gviejo committed May 23, 2024
1 parent 65b6aca commit b3aa862
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pynapple/core/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,14 @@ class BaseTsd(Base, NDArrayOperatorsMixin, abc.ABC):
def __init__(self, t, d, time_units="s", time_support=None, load_array=True):
super().__init__(t, time_units, time_support)

if not is_array_like(d):
raise TypeError(
"Data should be array-like, i.e. be indexable, iterable and, have attributes "
"`shape`, `ndim` and, `dtype`)."
)

if load_array:
self.values = convert_to_array(d, "d")
else:
if not is_array_like(d):
raise TypeError(
"Data should be array-like, i.e. be indexable, iterable and, have attributes "
"`shape`, `ndim` and, `dtype`)."
)
self.values = d

assert len(self.index) == len(
Expand Down

0 comments on commit b3aa862

Please sign in to comment.