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

Remove AbstractNdarrayUDF #415

Merged
merged 15 commits into from
Oct 3, 2022
Prev Previous commit
Next Next commit
Convert Array_Count to use AbstractUDF
  • Loading branch information
LordDarkula committed Oct 2, 2022
commit 87ad756949b427588a58ee23d01df597af9e9987
9 changes: 6 additions & 3 deletions eva/udfs/ndarray_udfs/array_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@
import numpy as np
import pandas as pd

from eva.udfs.ndarray_udfs.abstract_ndarray_udfs import AbstractNdarrayUDF
from eva.udfs.abstract_udf import AbstractUDF


class Array_Count(AbstractNdarrayUDF):
class Array_Count(AbstractUDF):
@property
def name(self) -> str:
return "Array_Count"

def exec(self, inp: pd.DataFrame):
def setup(self):
pass

def forward(self, inp: pd.DataFrame) -> pd.DataFrame:
"""
It will return a count of search element for each tuple.
The idea is to flatten the input array along the first dimension and
Expand Down