diff --git a/nvtabular/ops/fill.py b/nvtabular/ops/fill.py index 2bd9405c6a..4d6511fda0 100644 --- a/nvtabular/ops/fill.py +++ b/nvtabular/ops/fill.py @@ -14,7 +14,6 @@ # limitations under the License. # import dask.dataframe as dd -import numpy as np from merlin.core.dispatch import DataFrameType, annotate from merlin.dag.ops.stat_operator import StatOperator @@ -75,7 +74,7 @@ def column_mapping(self, col_selector): def _compute_dtype(self, col_schema, input_schema): col_schema = super()._compute_dtype(col_schema, input_schema) if col_schema.name.endswith("_filled"): - col_schema = col_schema.with_dtype(np.bool) + col_schema = col_schema.with_dtype(bool) return col_schema transform.__doc__ = Operator.transform.__doc__ @@ -143,5 +142,5 @@ def column_mapping(self, col_selector): def _compute_dtype(self, col_schema, input_schema): col_schema = super()._compute_dtype(col_schema, input_schema) if col_schema.name.endswith("_filled"): - col_schema = col_schema.with_dtype(np.bool) + col_schema = col_schema.with_dtype(bool) return col_schema diff --git a/nvtabular/tools/data_gen.py b/nvtabular/tools/data_gen.py index 70dc2ca775..d6037ee6f2 100644 --- a/nvtabular/tools/data_gen.py +++ b/nvtabular/tools/data_gen.py @@ -114,13 +114,13 @@ def create_cats(self, size, cats_rep, entries=False): if col.multi_min and col.multi_max: if HAS_GPU: ser = dist.create_col( - col_size + 1, dtype=np.long, min_val=col.multi_min, max_val=col.multi_max + col_size + 1, dtype=int, min_val=col.multi_min, max_val=col.multi_max ) ser = make_series(np.ceil(ser)).astype(ser.dtype) _cumsum = xp.cumsum else: ser = dist.create_col( - col_size + 1, dtype=np.long, min_val=col.multi_min, max_val=col.multi_max + col_size + 1, dtype=int, min_val=col.multi_min, max_val=col.multi_max ) ser = make_df(np.ceil(ser))[0] _cumsum = np.cumsum @@ -130,12 +130,12 @@ def create_cats(self, size, cats_rep, entries=False): offs = offs.astype("int32") if HAS_GPU: ser = dist.create_col( - col_size, dtype=np.long, min_val=col.min_val, max_val=col.cardinality + col_size, dtype=int, min_val=col.min_val, max_val=col.cardinality ) ser = make_series(np.ceil(ser)).astype(ser.dtype) else: ser = dist.create_col( - col_size, dtype=np.long, min_val=col.min_val, max_val=col.cardinality + col_size, dtype=int, min_val=col.min_val, max_val=col.cardinality ) ser = make_df(np.ceil(ser))[0] ser = ser.astype("int32")