Skip to content

Commit

Permalink
Fix ReduceDtypeSize operator
Browse files Browse the repository at this point in the history
  • Loading branch information
karlhigley committed Nov 22, 2022
1 parent 11bb404 commit ce9fa35
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nvtabular/ops/reduce_dtype_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import dask.dataframe as dd
import numpy as np

from merlin import dtype
from merlin.core.dispatch import DataFrameType, annotate
from merlin.schema import Schema
from nvtabular.ops.operator import ColumnSelector, Operator
Expand Down Expand Up @@ -52,7 +51,7 @@ def clear(self):
@annotate("reduce_dtype_size_transform", color="darkgreen", domain="nvt_python")
def transform(self, col_selector: ColumnSelector, df: DataFrameType) -> DataFrameType:
for col_name, col_dtype in self.dtypes.items():
np_dtype = dtype.to("numpy", col_dtype)
np_dtype = col_dtype.to("numpy")
df[col_name] = df[col_name].astype(np_dtype)
return df

Expand Down

0 comments on commit ce9fa35

Please sign in to comment.