示例#1
0
def map_array (surface, array):
    """pygame.surfarray.map_array (Surface, array3d): return array2d

    Map a 3D array into a 2D array.

    Convert a 3D array into a 2D array. This will use the given Surface
    format to control the conversion. Palette surface formats are not
    supported.
    """
    global numpysf
    try:
        return numpysf.map_array(surface, array)
    except AttributeError:
        import pygame._numpysurfarray as numpysf
        return numpysf.map_array(surface, array)
示例#2
0
def map_array(surface, array):
    """pygame.surfarray.map_array (Surface, array3d): return array2d

    Map a 3D array into a 2D array.

    Convert a 3D array into a 2D array. This will use the given Surface
    format to control the conversion. Palette surface formats are not
    supported.
    """
    return numpysf.map_array(surface, array)
示例#3
0
def map_array (surface, array):
    """pygame.surfarray.map_array (Surface, array3d): return array2d

    Map a 3D array into a 2D array.

    Convert a 3D array into a 2D array. This will use the given Surface
    format to control the conversion. Palette surface formats are not
    supported.
    """
    return numpysf.map_array (surface, array)
示例#4
0
def map_array(surface, array):
    """pygame.surfarray.map_array (Surface, array3d): return array2d

    Map a 3D array into a 2D array.

    Convert a 3D array into a 2D array. This will use the given Surface
    format to control the conversion. Palette surface formats are not
    supported.
    """
    if __arraytype == "numeric":
        return numericsf.map_array(surface, array)
    elif __arraytype == "numpy":
        return numpysf.map_array(surface, array)
    raise NotImplementedError("surface arrays are not supported")
示例#5
0
def map_array(surface, array):
    """pygame.surfarray.map_array (Surface, array3d): return array2d

    Map a 3D array into a 2D array.

    Convert a 3D array into a 2D array. This will use the given Surface
    format to control the conversion. Palette surface formats are not
    supported.
    """
    if __arraytype == "numeric":
        return numericsf.map_array(surface, array)
    elif __arraytype == "numpy":
        return numpysf.map_array(surface, array)
    raise NotImplementedError("surface arrays are not supported")