pygame / lib / surfarray.py

Diff from to

lib/surfarray.py

 as default if installed. If neither Numeric nor numpy are installed, the
 module will raise an ImportError.
 
-The array type to use can be changed at runtime using the use_array()
+The array type to use can be changed at runtime using the use_arraytype()
 method, which requires one of the above types as string.
 
 Note: numpy and Numeric are not completely compatible. Certain array
 
 import pygame
 
-# Global array type setting. See use_array().
+# Global array type setting. See use_arraytype().
 __arraytype = None
 
 # Try to import the necessary modules.
         return numpysf.map_array (surface, array)
     raise NotImplementedError, "surface arrays are not supported"
 
-def use_array (arraytype):
-    """pygame.surfarray.use_array (arraytype): return None
+def use_arraytype (arraytype):
+    """pygame.surfarray.use_arraytype (arraytype): return None
 
     Sets the array system to be used for surface arrays.
 
     else:
         raise ValueError, "invalid array type"
 
+def get_arraytype ():
+    """pygame.surfarray.get_arraytype (): return str
+
+    Gets the currently active array type.
+
+    Returns the currently active array type. This will be a value of the
+    get_arraytypes() tuple and indicates which type of array module is
+    used for the array creation.
+    """
+    return __arraytype
+
 def get_arraytypes ():
     """pygame.surfarray.get_arraytypes (): return tuple
 
 
     Checks, which array system types are available and returns them as a
     tuple of strings. The values of the tuple can be used directly in
-    the use_array () method.
+    the use_arraytype () method.
 
     If no supported array system could be found, None will be returned.
     """
     if len (vals) == 0:
         return None
     return tuple (vals)
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.