-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing np array dumping #599
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #599 +/- ##
==========================================
- Coverage 87.88% 87.87% -0.01%
==========================================
Files 100 100
Lines 10011 10015 +4
Branches 1357 1358 +1
==========================================
+ Hits 8798 8801 +3
Misses 871 871
- Partials 342 343 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Deploying datachain-documentation with Cloudflare Pages
|
src/datachain/sql/sqlite/types.py
Outdated
if np.issubdtype(arr.dtype, np.object_): | ||
# orjson cannot parse arrays with object subtype | ||
return json.dumps(arr.tolist(), default=_json_serialize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
orjson
also supports default=...
. See https://github.com/ijl/orjson#default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tnx, added it instead using json
.
Fix for dumping np array into SQLite as current json lib doesn't work well with the object type np arrays