NebulaGraph Python Client 5.0.0a1
|
Public Member Functions | |
__init__ (self, List[float] values, int dimension) | |
List[float] | get_values (self) |
int | get_dimension (self) |
int | __len__ (self) |
float | __getitem__ (self, int index) |
bool | __eq__ (self, other) |
str | __str__ (self) |
str | __repr__ (self) |
List[float] | cast_primitive (self) |
![]() | |
str | get_decode_type (self) |
"BaseDataObject" | set_decode_type (self, str decode_type) |
Public Attributes | |
values | |
dimension | |
Additional Inherited Members | |
![]() | |
_decode_type | |
Represents a fixed-dimension vector of float values.
Definition at line 858 of file py_data_types.py.
__init__ | ( | self, | |
List[float] | values, | ||
int | dimension | ||
) |
Initialize a Vector with values and dimension. Args: ---- values: List of float values representing the vector components dimension: The dimension of the vector (must match length of values) Raises: ------ ValueError: If length of values doesn't match the specified dimension
Reimplemented from BaseDataObject.
Definition at line 861 of file py_data_types.py.
bool __eq__ | ( | self, | |
other | |||
) |
Compare two vectors for equality.
Definition at line 898 of file py_data_types.py.
float __getitem__ | ( | self, | |
int | index | ||
) |
Get vector component at specified index.
Definition at line 892 of file py_data_types.py.
int __len__ | ( | self | ) |
Return the dimension of the vector.
Definition at line 888 of file py_data_types.py.
str __repr__ | ( | self | ) |
Return detailed string representation of the vector.
Definition at line 911 of file py_data_types.py.
str __str__ | ( | self | ) |
Return string representation of the vector.
Definition at line 907 of file py_data_types.py.
List[float] cast_primitive | ( | self | ) |
Convert vector to a list of float values.
Reimplemented from CompositeDataObject.
Definition at line 915 of file py_data_types.py.
int get_dimension | ( | self | ) |
Definition at line 885 of file py_data_types.py.
List[float] get_values | ( | self | ) |
Definition at line 882 of file py_data_types.py.
dimension |
Definition at line 880 of file py_data_types.py.
values |
Definition at line 879 of file py_data_types.py.