Skip to content

Commit

Permalink
add missed local import
Browse files Browse the repository at this point in the history
  • Loading branch information
jitingxu1 committed Sep 12, 2024
1 parent 4c8f7ce commit e84c65c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ibis_ml/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def _(X, y=None, maintain_order=False):

@normalize_table.register("pa.Table")
def _(X, y=None, maintain_order=False):
import numpy as np
import pyarrow as pa

if y is not None:
Expand Down Expand Up @@ -257,6 +258,8 @@ def get_categories(self, column: str) -> pa.Array | None:
return self.categories.get(column)

def set_categories(self, column: str, values: pa.Array | list[Any]) -> None:
import pyarrow as pa

self.categories[column] = pa.array(values)

def drop_categories(self, column: str) -> None:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ ignore = [
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]
"docs/**/*.py" = ["INP001"]
"ibis_ml/core.py" = ["TCH004"]

[tool.ruff.lint.isort]
split-on-trailing-comma = false
Expand Down

0 comments on commit e84c65c

Please sign in to comment.