narupatools.util.properties¶
Generate properties without having to write getter and setter.
Functions
Convert an empty annotated function into a property. |
|
Property internally stored as a NumPy array. |
|
Property stored as a bool. |
|
Property stored as a float. |
|
Property stored as an int. |
|
Property stored as a string. |
|
-
narupatools.util.properties.auto(f: Callable) → Any¶ Convert an empty annotated function into a property.
-
narupatools.util.properties.boolean(f: Callable) → _TValue¶
-
narupatools.util.properties.get_converter(annot)¶
-
narupatools.util.properties.integer(f: Callable) → _TValue¶
-
narupatools.util.properties.number(f: Callable) → _TValue¶
-
narupatools.util.properties.numpy(*, dtype: Union[numpy.dtype, None, type, numpy.typing._dtype_like._SupportsDType[numpy.dtype], str, Tuple[Any, int], Tuple[Any, Union[SupportsIndex, Sequence[SupportsIndex]]], List[Any], numpy.typing._dtype_like._DTypeDict, Tuple[Any, Any]], shape: Tuple[Optional[int]]) → Callable[[Any], numpy.ndarray]¶ Property internally stored as a NumPy array.
-
narupatools.util.properties.string(f: Callable) → _TValue¶
-
narupatools.util.properties.to_list(item_converter)¶
-
narupatools.util.properties.to_property(converter: Callable[[Any], _TValue]) → Callable[[Callable], _TValue]¶
-
narupatools.util.properties.to_serializable(serializable_type)¶
-
narupatools.util.properties.to_unit_quaternion(value: Any) → quaternion.quaternion¶
-
narupatools.util.properties.unit_quaternion(f: Callable) → _TValue¶