Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apis/python/node/src/lib.rs
Original file line number Diff line number Diff line change
@@ -47,6 +47,9 @@ impl Node {
let data = py_bytes.as_bytes();
self.send_output_slice(output_id, data.len(), data, metadata)
} else if let Ok(arrow_array) = arrow::array::ArrayData::from_pyarrow(data.as_ref(py)) {
if arrow_array.data_type() != &arrow::datatypes::DataType::UInt8 {
eyre::bail!("only arrow arrays with data type `UInt8` are supported");
}
if arrow_array.buffers().len() != 1 {
eyre::bail!("output arrow array must contain a single buffer");
}

0 comments on commit cc4acfe

Please sign in to comment.