'Takes a dict. Returns an identical dict, with all non-word
keys and all non-numeric values stripped out. All values also
converted to float. Used so we can safely use Python contexts.'

def strip_dict(self, inp_d):

    inp_d = dict([(k, numpy.complex(inp_d[k])) for k in inp_d if (isinstance(k, str) and k.isalnum() and isinstance(inp_d[k], numbers.Number))])
    return inp_d
