Skip to content

unienv_interface.transformations.crop

Classes:

Name Description
CropTransformation

CropTransformation

CropTransformation(
    crop_low: Union[int, float, BArrayType], crop_high: Union[int, float, BArrayType]
)

Bases: DataTransformation

Initialize Crop Transformation. Args: crop_low: Lower bound for cropping the data. crop_high: Upper bound for cropping the data.

Methods:

Name Description
validate_source_space
get_crop_range
get_target_space_from_source
transform
direction_inverse
serialize
deserialize_from
close

Attributes:

Name Type Description
has_inverse
crop_low
crop_high

has_inverse class-attribute instance-attribute

has_inverse = True

crop_low instance-attribute

crop_low = crop_low

crop_high instance-attribute

crop_high = crop_high

validate_source_space

validate_source_space(
    source_space: Space[Any, BDeviceType, BDtypeType, BRNGType],
) -> None

get_crop_range

get_crop_range(
    source_space: BoxSpace[Any, BDeviceType, BDtypeType, BRNGType],
) -> Tuple[BArrayType, BArrayType]

get_target_space_from_source

get_target_space_from_source(source_space)

transform

transform(source_space, data)

direction_inverse

direction_inverse(source_space=None)

serialize

serialize(
    source_space: Optional[Space[Any, BDeviceType, BDtypeType, BRNGType]] = None,
) -> Dict[str, Any]

deserialize_from classmethod

deserialize_from(
    json_data: Dict[str, Any],
    source_space: Optional[Space[Any, BDeviceType, BDtypeType, BRNGType]] = None,
) -> CropTransformation

close

close()