Table of Contents

Class RenderResult.Rgb

Namespace
Gym.Envs
Assembly
Gym.dll

An rgb_array frame: a (height, width, 3) uint8 array, rows top to bottom, as Gymnasium returns it after np.transpose(..., axes=(1, 0, 2)).

public sealed class RenderResult.Rgb : RenderResult, IEquatable<RenderResult>, IDisposable
Inheritance
RenderResult.Rgb
Implements
Inherited Members
Extension Methods

Constructors

Rgb(NDArray)

Wraps a frame.

public Rgb(NDArray frame)

Parameters

frame NDArray

The frame; the result takes it over, and the caller of render() owns it.

Exceptions

ArgumentNullException

Thrown when frame is null.

Properties

Frame

The frame.

public NDArray Frame { get; }

Property Value

NDArray

Methods

Dispose()

Releases the frame.

public override void Dispose()

Equals(RenderResult?)

Structural equality (see the class remarks).

public override bool Equals(RenderResult? other)

Parameters

other RenderResult

The other result; may be null.

Returns

bool

true when both are the same case with equal contents.

GetHashCode()

A hash consistent with Equals(RenderResult?): the case and the shapes, never the pixels.

public override int GetHashCode()

Returns

int

The hash.

ToString()

Describes the frame by shape and dtype, not by its pixels.

public override string ToString()

Returns

string

For example Rgb((400, 600, 3), uint8).