Skip to content

Commit

Permalink
fix: pin numpy to 1.x for lambda layers (#2889)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaidisido authored Jul 8, 2024
1 parent 5ee6698 commit 9200639
Show file tree
Hide file tree
Showing 4 changed files with 476 additions and 453 deletions.
2 changes: 1 addition & 1 deletion awswrangler/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ def split_pandas_frame(df: pd.DataFrame, splits: int) -> list[pd.DataFrame]:
total = len(df)
each_section, extras = divmod(total, splits)
section_sizes = [0] + extras * [each_section + 1] + (splits - extras) * [each_section]
div_points = _nx.array(section_sizes, dtype=_nx.intp).cumsum()
div_points = _nx.array(section_sizes, dtype=_nx.intp).cumsum() # type: ignore[attr-defined]

sub_dfs = []
for i in range(splits):
Expand Down
2 changes: 1 addition & 1 deletion awswrangler/s3/_write_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _get_bucketing_series(df: pd.DataFrame, bucketing_info: typing.BucketingInfo
axis="columns",
)
)
return bucket_number_series.astype(np.array([pd.CategoricalDtype(range(bucketing_info[1]))]))
return bucket_number_series.astype(pd.CategoricalDtype(range(bucketing_info[1])))


def _simulate_overflow(value: int, bits: int = 31, signed: bool = False) -> int:
Expand Down
Loading

0 comments on commit 9200639

Please sign in to comment.