Skip to content

Commit

Permalink
⬆️ Bump pipda to 0.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pwwang committed Oct 10, 2023
1 parent e96a109 commit da313f2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion datar/apis/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def _array_ufunc_with_backend(backend: str):


@register_func(cls=object, dispatchable="first")
def array_ufunc(x, ufunc, *args, **kwargs):
def array_ufunc(x, ufunc, *args, kind, **kwargs):
"""Implement the array ufunc
Allow other backends to override the behavior of the ufunc on
Expand Down
3 changes: 2 additions & 1 deletion datar/core/load_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
from .plugin import plugin


def _array_ufunc_to_register(ufunc, x, *args, **kwargs):
def _array_ufunc_to_register(ufunc, x, *args, kind, **kwargs):
"""Register the array ufunc to pipda"""
from ..apis.misc import array_ufunc

return array_ufunc(
x,
ufunc,
*args,
kind=kind,
**kwargs,
__backend=array_ufunc.backend,
)
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ repository = "https://github.com/pwwang/datar"
[tool.poetry.dependencies]
python = "^3.8"
simplug = "^0.3"
pipda = "^0.13"
pipda = "^0.13.1"
python-simpleconf = {version = "^0.6", extras = ["toml"]}
datar-numpy = {version = "^0.3.2", optional = true}
datar-pandas = {version = "^0.5.2", optional = true}
datar-pandas = {version = "^0.5.3", optional = true}
# datar-polars = {version = "^0.0.0", optional = true}
datar-arrow = {version = "^0.1", optional = true}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_array_ufunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Foo(list):
pass

@array_ufunc.register(Foo)
def _array_ufunc(x, ufunc, *args, **kwargs):
def _array_ufunc(x, ufunc, *args, kind, **kwargs):
return ufunc([i * 2 for i in x], *args, **kwargs)

out = np.sqrt(f)._pipda_eval(Foo([2, 8, 18]), Context.EVAL)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def misc_api():
from datar.apis.misc import array_ufunc

@array_ufunc.register(object, backend="testplugin1")
def _array_ufunc(x, ufunc, *args, **kwargs):
def _array_ufunc(x, ufunc, *args, kind, **kwargs):
return ufunc([i * 3 for i in x], *args, **kwargs)

return {"other_var": 1}
Expand Down

0 comments on commit da313f2

Please sign in to comment.