crate / crate/crate-python

TypeError: Type is not JSON serializable: `numpy.ndarray`/`recarray`

オープン
#729 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
85
フォーク
34
平均マージ
3日 16時間
マージ済み PR(30日)
3

説明

## Problem
We probed JSON serialization with `crate-python` and discovered it does not work well in all situations yet, for example when the data payload includes an array/list, and is read from JSON using pandas or Polars.

```json
{"foo":"bar","baz":["qux"]}
```

The reason is that the decoded payload includes `numpy.ndarray` or `recarray` types.

## Reproduce
[`cratedb-orjson.py`](https://gist.github.com/amotl/f55474d633e7c71498c24ce3ca4c6332) can be used to reproduce the problem.

## References
- https://github.com/crate/cratedb-toolkit/issues/482

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。