def test_write_scale():
    """
Test the standard scaling policies of `write`.

Integer input data:

    >>> input = [[-2**8, 0, 2**8]]
    >>> stream = write(input)
    >>> output = read(stream, scale=False)
    >>> (output == input).all()
    True

    >>> stream = write(input, scale=False)
    >>> output = read(stream, scale=False)
    >>> (output == input).all()
    True

    >>> stream = write(input, scale=True)
    >>> output = read(stream, scale=False)
    >>> (output == [[-2**15, 0, 2**15 - 1]]).all()
    True

Floating-point input data:

    >>> input = [[-0.5, 0.0, 0.5]]
    >>> stream = write(input)
    >>> output = read(stream)
    >>> (output == input).all()
    True

    >>> stream = write(input, scale=True)
    >>> output = read(stream)
    >>> (output == [[-1.0, 0.0, 1.0 - 2**(-15)]]).all()
    True

    >>> input = np.arange(-2**15, 2**15).astype(np.float64)
    >>> stream = write(input, scale=False)
    >>> output = read(stream, scale=False)
    >>> (output == input).all()
    True
    """
