mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 09:05:47 +08:00
edits for feedback
This commit is contained in:
1 parent
8d94b0f7a2
commit
a502fa7292
2 files changed
+9
-8
No files matched your search
@@ -504,8 +504,8 @@ Status FixedSizeListArray::FromArrays(const std::shared_ptr<Array>& values,
|
||||
auto list_type = std::make_shared<FixedSizeListType>(values->type(), list_size);
|
||||
std::shared_ptr<Buffer> validity_buf;
|
||||
|
||||
*out = std::make_shared<FixedSizeListArray>(list_type, length, values, validity_buf, -1,
|
||||
0);
|
||||
*out = std::make_shared<FixedSizeListArray>(list_type, length, values, validity_buf,
|
||||
/*null_count=*/-1, /*offset=*/0);
|
||||
return Status::OK();
|
||||
}
|
||||
|
||||
|
||||
@@ -1444,18 +1444,19 @@ cdef class FixedSizeListArray(Array):
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def from_arrays(values, int64_t length, MemoryPool pool=None):
|
||||
def from_arrays(values, int64_t list_size, MemoryPool pool=None):
|
||||
"""
|
||||
Construct ListArray from arrays of int32 offsets and values
|
||||
Construct FixedSizeListArray from array of values and a list length.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
offsets : Array (int32 type)
|
||||
values : Array (any type)
|
||||
list_size : int
|
||||
The fixed length of the lists.
|
||||
|
||||
Returns
|
||||
-------
|
||||
list_array : ListArray
|
||||
FixedSizeListArray
|
||||
"""
|
||||
cdef:
|
||||
Array _values
|
||||
@@ -1465,7 +1466,7 @@ cdef class FixedSizeListArray(Array):
|
||||
|
||||
with nogil:
|
||||
check_status(CFixedSizeListArray.FromArrays(
|
||||
_values.sp_array, length, &out))
|
||||
_values.sp_array, list_size, &out))
|
||||
cdef Array result = pyarrow_wrap_array(out)
|
||||
result.validate()
|
||||
return result
|
||||
@@ -1476,7 +1477,7 @@ cdef class FixedSizeListArray(Array):
|
||||
|
||||
def flatten(self):
|
||||
"""
|
||||
Unnest this ListArray by one level
|
||||
Unnest this FixedSizeListArray by one level.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
||||
Reference in new issue
Block a user