PyDL:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- pydl v1.0.0-rc2 »
- SDSS Utilities (`pydl.pydlutils`) »
- nw_float_to_byte

# nw_float_to_byte

pydl.pydlutils.rgbcolor.nw_float_to_byte(image, bits=8)

  Converts an array of floats in [0.0, 1.0] to bytes in [0, 255].

  Parameters
    image `ndarray`

      Image to convert.

    bits `int`, optional

      Number of bits in final image.

  Returns
    `ndarray`

      Converted image.