Skip to main content

new_empty_array

Function new_empty_array 

Source
pub fn new_empty_array(data_type: &DataType) -> Result<ArrayRef>
Expand description

An empty array of the given type.

ยงErrors

DataError::InvalidFixedSize when a fixed-size type carries a non-positive width.

use astrs_data::array::new_empty_array;
use astrs_data::DataType;

assert_eq!(new_empty_array(&DataType::Utf8)?.len(), 0);