Skip to content

Commit

Permalink
code-review feedback
Browse files Browse the repository at this point in the history
Co-authored-by: nguyenv <vivian@tiledb.com>
  • Loading branch information
johnkerl and nguyenv committed Oct 27, 2024
1 parent 15b1a3b commit b843e48
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apis/python/src/tiledbsoma/_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ def _upgrade_or_change_domain_helper(
dim_schema = pa.schema(dim_schema_list)

# Convert the user's tuple of low/high pairs into a dict keyed by index-column name.
new_domain_dict: Dict[str, Iterable[Any]] = {}
for i, dim_name in enumerate(dim_names):
new_domain_dict: Dict[str, Domain] = {}
for dim_name, new_dom in zip(dim_names, newdomain):
# Domain can't be specified for strings (core constraint) so let them keystroke that easily.
if (
dim_schema.field(dim_name).type
Expand All @@ -531,11 +531,11 @@ def _upgrade_or_change_domain_helper(
pa.binary(),
pa.large_binary(),
]
and newdomain[i] is None
and new_dom is None
):
new_domain_dict[dim_name] = ("", "")
else:
new_domain_dict[dim_name] = tuple(newdomain[i]) # type: ignore
new_domain_dict[dim_name] = tuple(new_dom) # type: ignore

# Return this as a pyarrow table. This has n columns where n is the number of
# index columns, and two rows: one row for the low values and one for the high values.
Expand Down

0 comments on commit b843e48

Please sign in to comment.