Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Series equality comparison #2681

Closed
stress-tess opened this issue Aug 16, 2023 · 0 comments · Fixed by #2752
Closed

Fix Series equality comparison #2681

stress-tess opened this issue Aug 16, 2023 · 0 comments · Fixed by #2752
Assignees
Labels
bug Something isn't working

Comments

@stress-tess
Copy link
Member

In [3]: s = ak.Series((ak.arange(3), ak.arange(3)))

In [4]: s == s
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[4], line 1
----> 1 s == s

File ~/proj/arkouda/arkouda/series.py:252, in Series._make_binop.<locals>.binop(self, other)
    250 if isinstance(other, Series):
    251     if self.index._check_aligned(other.index):
--> 252         return cls((self.index, operator(self.values, other.values)))
    253     else:
    254         idx = self.index._merge(other.index).index

File /opt/homebrew/Caskroom/miniforge/base/envs/arkouda-dev/lib/python3.10/site-packages/typeguard/__init__.py:891, in typechecked.<locals>.wrapper(*args, **kwargs)
    889 memo = _CallMemo(python_func, _localns, args=args, kwargs=kwargs)
    890 check_argument_types(memo)
--> 891 retval = func(*args, **kwargs)
    892 check_return_type(retval, memo)
    894 # If a generator is returned, wrap it if its yield/send/return types can be checked

File ~/proj/arkouda/arkouda/series.py:127, in Series.__init__(self, data, index)
    124 if isinstance(data, (tuple, list)) and len(data) == 2:
    125     # handles the previous `ar_tuple` case
    126     if not isinstance(data[0], (pdarray, Strings, Categorical, list, tuple)):
--> 127         raise TypeError("indices must be a pdarray, Strings, Categorical, List, or Tuple")
    128     if not isinstance(data[1], (pdarray, Strings, Categorical)):
    129         raise TypeError("values must be a pdarray, Strings, or Categorical")

TypeError: indices must be a pdarray, Strings, Categorical, List, or Tuple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant