-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(python): Split ArrowArray and ArrowArrayStream modules (#559)
This is the final splitting of modules from `_lib.pyx`, which no longer exists! It separates the array stream and array components to live in separate .pyx files and adds basic docstrings to internal functions. It also removes a few references to `_lib` and `c_lib` that had made it through to this PR.
- Loading branch information
1 parent
9a00532
commit d6368d0
Showing
20 changed files
with
797 additions
and
1,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,7 +87,6 @@ | |
"c_array_from_buffers", | ||
"c_array_stream", | ||
"c_buffer", | ||
"c_lib", | ||
"c_schema", | ||
"c_version", | ||
"date32", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# cython: language_level = 3 | ||
|
||
from libc.stdint cimport int64_t | ||
|
||
from nanoarrow_c cimport ( | ||
ArrowArray, | ||
ArrowArrayView, | ||
) | ||
|
||
from nanoarrow_device_c cimport ( | ||
ArrowDeviceArray, | ||
ArrowDeviceType | ||
) | ||
|
||
from nanoarrow._device cimport Device | ||
from nanoarrow._schema cimport CSchema | ||
|
||
|
||
cdef class CArray: | ||
cdef object _base | ||
cdef ArrowArray* _ptr | ||
cdef CSchema _schema | ||
cdef ArrowDeviceType _device_type | ||
cdef int _device_id | ||
|
||
cdef _set_device(self, ArrowDeviceType device_type, int64_t device_id) | ||
|
||
|
||
cdef class CArrayView: | ||
cdef object _base | ||
cdef object _array_base | ||
cdef ArrowArrayView* _ptr | ||
cdef Device _device | ||
|
||
cdef class CDeviceArray: | ||
cdef object _base | ||
cdef ArrowDeviceArray* _ptr | ||
cdef CSchema _schema |
Oops, something went wrong.