MCPcopy Create free account
hub / github.com/101dotxyz/GPTeam / NumpyArrayEncoder

Class NumpyArrayEncoder

src/utils/database/sqlite.py:15–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14
15class NumpyArrayEncoder(json.JSONEncoder):
16 def default(self, obj):
17 if isinstance(obj, ndarray):
18 return obj.tolist()
19 return json.JSONEncoder.default(self, obj)
20
21
22def dict_factory(cursor: Cursor, row: Any) -> dict[str, Any]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected