Datasets:
Formats:
csv
Languages:
English
Size:
< 1K
Tags:
robotics
embodied-ai
human-demonstration
egocentric-video
bimanual-manipulation
tactile-sensing
License:
Download player/runtime/python/Lib/site-packages/rerun/encodings/float64.py from alinarus/MultimodalData: direct link, hf CLI and curl.
- Browser
- Download file 2.08 kB
-
https://huggingface.co/datasets/alinarus/MultimodalData/resolve/main/player/runtime/python/Lib/site-packages/rerun/encodings/float64.py
- Command line
-
hf download hf://datasets/alinarus/MultimodalData/player/runtime/python/Lib/site-packages/rerun/encodings/float64.py
-
curl -L -o float64.py https://huggingface.co/datasets/alinarus/MultimodalData/resolve/main/player/runtime/python/Lib/site-packages/rerun/encodings/float64.py
2.08 kB
| # DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/python/mod.rs | |
| # Based on "crates/build/re_type_definitions/rerun/encodings/float64.def.rs". | |
| # You can extend this class by creating a "Float64Ext" class in "float64_ext.py". | |
| from __future__ import annotations | |
| from collections.abc import Sequence | |
| from typing import TYPE_CHECKING, Any | |
| import numpy as np | |
| import numpy.typing as npt | |
| import pyarrow as pa | |
| from attrs import define, field | |
| from .._baseclasses import ( | |
| BaseBatch, | |
| ) | |
| from .._numpy_compatibility import asarray | |
| __all__ = ["Float64", "Float64ArrayLike", "Float64Batch", "Float64Like"] | |
| class Float64: | |
| """**Encoding**: A double-precision 64-bit IEEE 754 floating point number.""" | |
| def __init__(self: Any, value: Float64Like) -> None: | |
| """Create a new instance of the Float64 encoding.""" | |
| # You can define your own __init__ function as a member of Float64Ext in float64_ext.py | |
| self.__attrs_init__(value=value) | |
| value: float = field(converter=float) | |
| def __array__(self, dtype: npt.DTypeLike = None, copy: bool | None = None) -> npt.NDArray[Any]: | |
| # You can define your own __array__ function as a member of Float64Ext in float64_ext.py | |
| return asarray(self.value, dtype=dtype, copy=copy) | |
| def __float__(self) -> float: | |
| return float(self.value) | |
| def __hash__(self) -> int: | |
| return hash(self.value) | |
| if TYPE_CHECKING: | |
| Float64Like = Float64 | float | |
| """A type alias for any Float64-like object.""" | |
| else: | |
| Float64Like = Any | |
| Float64ArrayLike = ( | |
| Float64 | Sequence[Float64Like] | npt.NDArray[Any] | npt.ArrayLike | Sequence[Sequence[float]] | Sequence[float] | |
| ) | |
| """A type alias for any Float64-like array object.""" | |
| class Float64Batch(BaseBatch[Float64ArrayLike]): | |
| _ARROW_DATATYPE = pa.float64() | |
| def _native_to_pa_array(data: Float64ArrayLike, data_type: pa.DataType) -> pa.Array: | |
| array = np.asarray(data, dtype=np.float64).flatten() | |
| return pa.array(array, type=data_type) | |