| 2 | import numpy as np |
| 3 | |
| 4 | class CustomJSONEncoder(json.JSONEncoder): |
| 5 | def default(self, obj): |
| 6 | if isinstance(obj, np.int64): |
| 7 | return int(obj) |
| 8 | elif isinstance(obj, tuple): |
| 9 | return list(obj) |
| 10 | elif isinstance(obj, np.ndarray): |
| 11 | return obj.tolist() |
| 12 | return super(CustomJSONEncoder, self).default(obj) |
nothing calls this directly
no outgoing calls
no test coverage detected