pingwyn.core.func.convert.to_uint8

Convert object values to numpy unsigned 8-bit integers.

param obj:

Object to convert.

type obj:

pingwyn.Curve or pingwyn.Grid or pingwyn.Image or pingwyn.Profile

returns:

Converted object. Has the same type as the input object.

rtype:

pingwyn.Curve or pingwyn.Grid or pingwyn.Image or pingwyn.Profile

See also

pingwyn.normalise

Used to ensure data fits within a uint8.