(self, name, indices, empty_err)
Retrieve a memoryview to a scalar variable or an array element's buffer.
Retrieve a memoryview to a scalar variable or an array element's buffer.
Retrieve a memoryview to a scalar variable or an array element s buffer .
def _view_buffer(self, name, indices, empty_err):
        """Retrieve a memoryview to a scalar variable or an array element's buffer."""
        if not indices:
            if name not in self.scalars:
                # variable will be allocated
                self.scalars.set(name)
                if empty_err:
                    raise error.BASICError(error.IFC)
            return self.scalars.view_buffer(name)
        else:
            # array will be allocated if retrieved and nonexistant
            return self.arrays.view_buffer(name, indices)
def _view_buffer ( self , name , indices , empty_err ) : if not indices : if name not in self . scalars : # variable will be allocated self . scalars . set ( name ) if empty_err : raise error . BASICError ( error . IFC ) return self . scalars . view_buffer ( name ) else : # array will be allocated if retrieved and nonexistant return self . arrays . view_buffer ( name , indices )