MCPcopy Create free account
hub / github.com/apache/arrow / size

Method size

cpp/src/arrow/tensor.cc:521–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521int64_t Tensor::size() const {
522 return std::accumulate(shape_.begin(), shape_.end(), 1LL, std::multiplies<int64_t>());
523}
524
525bool Tensor::is_contiguous() const {
526 return internal::IsTensorStridesContiguous(type_, shape_, strides_);

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by 15

test_sizeMethod · 0.36
test_resizeMethod · 0.36
test_n_columnsMethod · 0.36
test_too_negativeMethod · 0.36
test_too_largeMethod · 0.36
test_reader_backendMethod · 0.36
test_new_data_typeMethod · 0.36
test_append_nullMethod · 0.36
test_append_nullsMethod · 0.36