raster_stream_buffer.py
def mask_by_inv_value_op(array, value, nodata):
    """Return 0 where array==value 1 otherwise."""
    result = numpy.empty_like(array)
    result[:] = 0
    result[array != value] = 1
    result[numpy.isclose(array, nodata)] = 2
    return result
Return 0 where array==value 1 otherwise.
Return 0 where array==value 1 otherwise.
Return 0 where array == value 1 otherwise .
def mask_by_inv_value_op(array, value, nodata):
    result = numpy.empty_like(array)
    result[:] = 0
    result[array != value] = 1
    result[numpy.isclose(array, nodata)] = 2
    return result
def mask_by_inv_value_op ( array , value , nodata ) : result = numpy . empty_like ( array ) result [ : ] = 0 result [ array != value ] = 1 result [ numpy . isclose ( array , nodata ) ] = 2 return result
Return 0 where array==value 1 otherwise.
Return 0 where array == value 1 otherwise .
"""Return 0 where array==value 1 otherwise."""
array
value
nodata