(obj: Any)
| 55 | |
| 56 | |
| 57 | def _numpy_to_python(obj: Any) -> Any: |
| 58 | if obj is None: |
| 59 | return None |
| 60 | if hasattr(obj, "tolist"): |
| 61 | return obj.tolist() |
| 62 | if isinstance(obj, (list, tuple)): |
| 63 | return [_numpy_to_python(x) for x in obj] |
| 64 | if isinstance(obj, dict): |
| 65 | return {k: _numpy_to_python(v) for k, v in obj.items()} |
| 66 | elif isinstance(obj, (str, int, float, bool)): |
| 67 | return obj |
| 68 | return str(obj) |
| 69 | |
| 70 | |
| 71 | def _extract_items(result_obj: Any) -> List[Dict[str, Any]]: |
no outgoing calls
no test coverage detected