Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

recreating indexes after conversion

オープン
#269 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python
領域
data

調査の方向性

Start with the discussion from PR 163 linked in the issue and determine the intended behavior for indexes during unit conversion. The work is done when the project has a decided, implemented approach that accounts for underlying index types and preserves or drops indexes as intended.

索引モデルが issue の本文から書いたものです。

説明

@benbovy, do you have any idea about how to best do this? from_variables is a class method, so it won't preserve any options that were already on the index, even if we don't pass an empty dict. This shouldn't block this PR, though.

Originally posted by @keewis in https://github.com/xarray-contrib/pint-xarray/pull/163#discussion_r1669996550

I'm afraid there is no easy way of converting units (i.e, new coordinate values + re-create the underlying index + wrap it as a new PintIndex) that would be completely agnostic of the underlying index type.

Actually I would rather drop the index and let the user re-create it manually. This is also better behavior for custom indexes that may be expensive to build (e.g., a KDTree).

For convenience we might also choose to auto-convert indexes for Xarray built-in index types only (and pass the options in a hard-coded way, if any... currently PandasIndex and PandasMultiIndex do not expose any option).

Originally posted by @benbovy in https://github.com/xarray-contrib/pint-xarray/pull/163#discussion_r1670068233

主要言語
Python
スター
119
フォーク
16
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

xarray-contrib/pint-xarray のほかの issue

xarray-contrib/pint-xarray の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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