MCPcopy Create free account
hub / github.com/Continual-Intelligence/SEAL / default

Method default

few-shot/self-edit.py:132–141  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

130class NumpyEncoder(json.JSONEncoder):
131 """Custom JSON encoder to handle NumPy types."""
132 def default(self, obj):
133 if isinstance(obj, np.integer):
134 return int(obj)
135 if isinstance(obj, np.floating):
136 return float(obj)
137 if isinstance(obj, np.ndarray):
138 return obj.tolist()
139 if isinstance(obj, np.bool_):
140 return bool(obj)
141 return super(NumpyEncoder, self).default(obj)
142
143
144def get_augmenters(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected