Skip to content

Commit

Permalink
Small docs edit (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron authored Aug 13, 2024
1 parent 963f477 commit 7a34019
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ theme:
text: Roboto
code: Roboto Mono

# logo: img/geopolars_logo.svg

features:
- content.code.annotate
- content.code.copy
Expand Down
8 changes: 8 additions & 0 deletions pyo3-arrow/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ use crate::{PyDataType, PyField};
/// A Python-facing Arrow array.
///
/// This is a wrapper around an [ArrayRef] and a [FieldRef].
///
/// It's important for this to wrap both an array _and_ a field so that it can faithfully store all
/// data transmitted via the `__arrow_c_array__` Python method, which [exports both an Array and a
/// Field](https://arrow.apache.org/docs/format/CDataInterface/PyCapsuleInterface.html#arrow_c_array__).
/// In particular, storing a [FieldRef] is required to persist Arrow extension metadata through the
/// C Data Interface.
#[pyclass(module = "arro3.core._core", name = "Array", subclass)]
pub struct PyArray {
array: ArrayRef,
Expand All @@ -37,6 +43,8 @@ pub struct PyArray {

impl PyArray {
/// Create a new Python Array from an [ArrayRef] and a [FieldRef].
///
/// This will panic if the array's data type does not match the field's data type.
pub fn new(array: ArrayRef, field: FieldRef) -> Self {
assert_eq!(array.data_type(), field.data_type());
Self { array, field }
Expand Down

0 comments on commit 7a34019

Please sign in to comment.