social_dilemmas/envs/map_env.py
def ascii_to_numpy(self, ascii_list):
        """converts a list of strings into a numpy array


        Parameters
        ----------
        ascii_list: list of strings
            List describing what the map should look like
        Returns
        -------
        arr: np.ndarray
            numpy array describing the map with ' ' indicating an empty space
        """

        arr = np.full((len(ascii_list), len(ascii_list[0])), b" ", dtype="c")
        for row in range(arr.shape[0]):
            for col in range(arr.shape[1]):
                arr[row, col] = ascii_list[row][col]
        return arr
converts a list of strings into a numpy array


        Parameters
        ----------
        ascii_list: list of strings
            List describing what the map should look like
        Returns
        -------
        arr: np.ndarray
            numpy array describing the map with ' ' indicating an empty space
        
converts a list of strings into a numpy array
Parameters

list of strings
List describing what the map should look like
Returns

np.ndarray
numpy array describing the map with ' ' indicating an empty space
converts a list of strings into a numpy array Parameters list of strings List describing what the map should look like Returns np . ndarray numpy array describing the map with ' ' indicating an empty space
def ascii_to_numpy(self, ascii_list):
        arr = np.full((len(ascii_list), len(ascii_list[0])), b" ", dtype="c")
        for row in range(arr.shape[0]):
            for col in range(arr.shape[1]):
                arr[row, col] = ascii_list[row][col]
        return arr
def ascii_to_numpy ( self , ascii_list ) : arr = np . full ( ( len ( ascii_list ) , len ( ascii_list [ 0 ] ) ) , b" " , dtype = "c" ) for row in range ( arr . shape [ 0 ] ) : for col in range ( arr . shape [ 1 ] ) : arr [ row , col ] = ascii_list [ row ] [ col ] return arr
converts a list of strings into a numpy array
Parameters
converts a list of strings into a numpy array Parameters
"""converts a list of strings into a numpy array


        Parameters
        ----------
        ascii_list: list of strings
            List describing what the map should look like
        Returns
        -------
        arr: np.ndarray
            numpy array describing the map with ' ' indicating an empty space
        """
self
ascii_list