(self, x)
return np.array([item for sublist in x for item in sublist])
Called on list of lists of costs, where each nested list is a separate multicost,
        and returns the un-summed individual branch costs.

        Arguments:
           x (list): list of lists of costs as returned by multicost_recurse
Called on list of lists of costs, where each nested list is a separate multicost,
        and returns the un-summed individual branch costs.
Called on list of lists of costs where each nested list is a separate multicost and returns the un - summed individual branch costs .
def separate_branch_costs(self, x):
        """
        Called on list of lists of costs, where each nested list is a separate multicost,
        and returns the un-summed individual branch costs.

        Arguments:
           x (list): list of lists of costs as returned by multicost_recurse
        """
        # Subtract branch costs from total cost
        x[0] -= np.sum([c[0] if type(c) == list else c for c in x[1:]])
        # Recurse into non-trunk branches
        for branch in x:
            if type(branch) == list:
                self.separate_branch_costs(branch)
        # Return a flattened version of the list
        return np.array([item for sublist in x for item in sublist])
def separate_branch_costs ( self , x ) : # Subtract branch costs from total cost x [ 0 ] -= np . sum ( [ c [ 0 ] if type ( c ) == list else c for c in x [ 1 : ] ] ) # Recurse into non-trunk branches for branch in x : if type ( branch ) == list : self . separate_branch_costs ( branch ) # Return a flattened version of the list return np . array ( [ item for sublist in x for item in sublist ] )