Skip to content




class NumpyJSONEncoder(json.JSONEncoder)


JSON encoder for numpy objects.

Based off the stackoverflow answer by Jie Yang here: The license for this code is BY-SA 4.0.


class HashableDict(dict)


A dictionary which is hashable so long as all of its values are hashable.

A HashableDict object will allow setting / deleting of items until the first time that __hash__() is called on it after which attempts to set or delete items will throw RuntimeError exceptions.