newton.utils.load_texture#

newton.utils.load_texture(texture)[source]#

Normalize a texture input into a contiguous image array.

Parameters:

texture (str | PathLike[str] | ndarray[Any, dtype[Any]] | None) – Path/URL to a texture image or an array (H, W, C).

Returns:

Contiguous image array, or None if unavailable.

Return type:

np.ndarray | None