Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Cython compilation warnings. #9327

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/cudf/cudf/_lib/parquet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ cpdef read_parquet(filepaths_or_buffers, columns=None, row_groups=None,

# Access the Parquet user_data json to find the index
index_col = None
is_range_index = False
cdef map[string, string] user_data = c_out_table.metadata.user_data
json_str = user_data[b'pandas'].decode('utf-8')
meta = None
Expand All @@ -171,7 +172,6 @@ cpdef read_parquet(filepaths_or_buffers, columns=None, row_groups=None,
index_col[0]['kind'] == 'range':
is_range_index = True
else:
is_range_index = False
index_col_names = OrderedDict()
for idx_col in index_col:
for c in meta['columns']:
Expand Down
7 changes: 2 additions & 5 deletions python/cudf/cudf/_lib/reduce.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,8 @@ def scan(scan_op, Column incol, inclusive, **kwargs):
cdef unique_ptr[column] c_result
cdef Aggregation cython_agg = make_aggregation(scan_op, kwargs)

cdef scan_type c_inclusive
if inclusive is True:
c_inclusive = scan_type.INCLUSIVE
elif inclusive is False:
c_inclusive = scan_type.EXCLUSIVE
cdef scan_type c_inclusive = \
scan_type.INCLUSIVE if inclusive else scan_type.EXCLUSIVE

with nogil:
c_result = move(cpp_scan(
Expand Down
2 changes: 1 addition & 1 deletion python/cudf/cudf/_lib/utils.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ cdef data_from_unique_ptr(
cdef vector[unique_ptr[column]] c_columns = move(c_tbl.get().release())
cdef vector[unique_ptr[column]].iterator it = c_columns.begin()

cdef int i
cdef size_t i

columns = [Column.from_unique_ptr(move(dereference(it+i)))
for i in range(c_columns.size())]
Expand Down