Closed gdementen closed 10 months ago
Another line causing the same warning (I will have to check all uses of pd.Index()):
[...]\larray\core\array.py:1541: FutureWarning: In a future version, the Index constructor will not infer numeric dtypes when passed object-dtype sequences (matching Series behavior)
columns = pd.Index(self.axes[-1].labels)
This happens when we have a numpy array of object dtype which only contains numeric values, which Pandas currently converts to a numeric index (e.g. Int64Index) instead of a generic/object Index (and will no longer do that)
Minimal test case:
>>> arr = ndtest("a=0..2").with_total()[:2]
>>> pd.Index(arr.a.labels)
FutureWarning: In a future version, the Index constructor will not infer numeric dtypes when passed object-dtype sequences (matching Series behavior)
This was introduced in Pandas 1.4. See https://github.com/pandas-dev/pandas/pull/42870
When running
moses_git\rework2022\src\main.py
with my updated environment (larray 0.34 et al), I get the following warning: