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

Method view

cpp/gdb_arrow.py:690–705  ·  view source on GitHub ↗

Return a view over the primitive values in this buffer. The optional `offset` and `length` are expressed in primitive values, not bytes.

(self, offset=0, length=None)

Source from the content-addressed store, hash-verified

688 return cls(val, mem_format)
689
690 def view(self, offset=0, length=None):
691 """
692 Return a view over the primitive values in this buffer.
693
694 The optional `offset` and `length` are expressed in primitive values,
695 not bytes.
696 """
697 if self.is_boolean:
698 return Bitmap.from_buffer(self, offset, length)
699
700 byte_offset = offset * self.byte_width
701 if length is not None:
702 mem = self.bytes_view(byte_offset, length * self.byte_width)
703 else:
704 mem = self.bytes_view(byte_offset)
705 return TypedView(mem, self.mem_format)
706
707 @property
708 def is_boolean(self):

Callers 8

test_validMethod · 0.45
test_invalidMethod · 0.45
_reconstruct_blockFunction · 0.45
test_viewFunction · 0.45
test_non_cpu_arrayFunction · 0.45
make_columnFunction · 0.45
_buffer_valuesMethod · 0.45

Calls 3

TypedViewClass · 0.85
bytes_viewMethod · 0.80
from_bufferMethod · 0.45

Tested by 5

test_validMethod · 0.36
test_invalidMethod · 0.36
test_viewFunction · 0.36
test_non_cpu_arrayFunction · 0.36