@staticmethod
def _remove_value(x, value):
    """
        Remove certain valued elements from a vector
        x: vector (must); value: scalar
        return a vector with all elements = 'value' removed
        """
    return (x - value).nonzero_values() + value
