{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / util / dtype / _scale

function

skimage.util.dtype:_scale

source: /dev/scikit-image/src/skimage/util/dtype.py :136

Signature

def   _scale ( a n m copy = True )

Summary

Scale an array of unsigned/positive integers from n to m bits.

Extended Summary

Numbers can be represented exactly only if m is a multiple of n.

Parameters

a : ndarray

Input image array.

n : int

Number of bits currently used to encode the values in a.

m : int

Desired number of bits to encode the values in out.

copy : bool, optional

If True, allocates and returns new array. Otherwise, modifies a in place.

Returns

out : array

Output image array. Has the same kind as a.

Aliases

  • skimage.util.dtype._scale