Variable-width strings load from Zarr with an unexpected dtype of "numpy.dtypes.StringDType"
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading the Zarr loading path and the existing handling of object dtype strings, then compare it with the example using NumPy StringDType and Zarr format 3. Check the related context in issue #7092 to understand the stated support limitation. Done means loading the example no longer returns an unexpected dtype, with a focused regression test covering the result.
索引モデルが issue の本文から書いたものです。
説明
It appears that zarr will create this from numpy arrays of type 'np.dtypes.StringDType'.
To create this with Zarr we must supply the 'StringDType' dtype.
The result is that the zarr data has a simple '"dtype" = "string"' in the metadata.
The current Iris Zarr saver seems to understand to do this conversion with arrays of type 'object',
I.E. like`np.array('a', 'one'], dtype="O")``
( which is how netCDF4 reads back variable-length strings ).
For this type of data, however,
when loading, iris produces numpy arrays of dtype 'StringDType' instead of 'O'.
N.B. we don't expect to handle this correctly yet, cf #7092
For example:
# Create the original NetCDF variable-length string array.
string_values = np.array(["one", "a", "ninety-nine"], dtype=object)
root = zarr.open_group("string_data.zarr", mode="w")
vxs = root.create_array("vxs", data=string_values.astype(np.dtypes.StringDType))
print("Zarr strings written:", vxs[:].tolist())
print()
print("vxs metdata:")
os.system("cat string_data.zarr/vxs/zarr.json")
print()
cube = iris.load_cube("string_data.zarr")
print("Iris data read:", repr(cube.data))
giving
vxs metdata:
{
"shape": [
3
],
"data_type": "string",
"chunk_grid": ...
...
"attributes": {},
"zarr_format": 3,
"node_type": "array",
"storage_transformers": []
}
Iris data read: array(['one', 'a', 'ninety-nine'], dtype=StringDType())
- 主要言語
- Python
- スター
- 730
- フォーク
- 323
- 平均マージ
- 3日 21時間
- マージ済み PR(30日)
- 16
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SciTools/iris のほかの issue
-
Link Checker Report対応中かも @stephenworsley が 12 日前に担当しました。 オープンBot Type: Bug Type: Documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
SciTools/iris#7368 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
guess_bounds(yearly=True) fails on a single point, monthly=True works対応中かも @pp-mo が 47 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
SciTools/iris#7311 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Agentic
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
flaky: test_fire_returns_thread_per_http_entry_on_head waits 5 s per dispatch worker on busy shardsオープンstatus/accepted type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
microsoft/apm#5309 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug vector-store
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
EverMind-AI/Raven#1413 ·
メンテナーはふだん 1 日以内に返信
-
Tests: parallel pyinstallcheck runs oversubscribe the machine through nested TBB and BLAS pools対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
ACCESS-NRI/containerised-environments-infra#143 ·
メンテナーはふだん 2 日以内に返信