html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/7363#issuecomment-1340809916,https://api.github.com/repos/pydata/xarray/issues/7363,1340809916,IC_kwDOAMm_X85P6yK8,14808389,2022-12-07T11:09:03Z,2022-12-07T11:09:03Z,MEMBER,"> implementing a ""grow_coordinate"" function to grow / reallocate larger arrays copying the previous chunk along a coordinate this sounds a lot like `pad` with `mode=""constant""`? > is it possible that xarray makes no assumptions of this kind `xarray` uses `pandas` indexes for alignment and indexing (if you have a recent version of `xarray` you should see the ""Indexes"" section in the HTML repr), so yes, it will always make sure to use a search that is more efficient than the linear search, as long as the data is sorted. This was also the reason why you had to use `swap_dims` / `set_index` to create an index along the coordinate you wanted to `reindex`.","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 1, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1479121713 https://github.com/pydata/xarray/issues/7363#issuecomment-1340771454,https://api.github.com/repos/pydata/xarray/issues/7363,1340771454,IC_kwDOAMm_X85P6ox-,5821660,2022-12-07T10:50:28Z,2022-12-07T10:50:28Z,MEMBER,"Does this more or less represent your Dataset? ```python import numpy as np import xarray as xr import datetime # create two timeseries', second is for reindex itime = np.arange(0, 3208464).astype("" 340_097_184. Going from float (8 byte) this will lead to 2_720_777_472, roughly 2.7GB which should fit in most setups. I'm not really sure but good chance that reindex is creating a completely new Dataset, which means the computer has to hold the origin as well as the new Dataset (which is roughly 3.2GB). This adds up to almost 6GB RAM. Depending on your machine and other tasks this might drive into RAM issues. But xarray devs will know better. @keewis suggestion of creating and concatenating a new array with predefined values which is file-backed could resolve the issues you are currently facing. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1479121713 https://github.com/pydata/xarray/issues/7363#issuecomment-1339675640,https://api.github.com/repos/pydata/xarray/issues/7363,1339675640,IC_kwDOAMm_X85P2dP4,14808389,2022-12-06T16:55:40Z,2022-12-06T16:55:40Z,MEMBER,"I'm a bit surprised. Could you post a `repr` of `timestamps_extended_basis`? That might help figuring out what exactly happened. If everything fails, you might also create a new `xarray` object with just the new values, and then use `xr.concat` to combine both?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1479121713 https://github.com/pydata/xarray/issues/7363#issuecomment-1339568566,https://api.github.com/repos/pydata/xarray/issues/7363,1339568566,IC_kwDOAMm_X85P2DG2,14808389,2022-12-06T15:39:20Z,2022-12-06T15:39:20Z,MEMBER,"I *think* this is because you don't have an index along the dimension. Try any of ```python previous_observations.set_coords([""timestamps""]).swap_dims({""time"": ""timestamps""}).reindex(...) previous_observations.set_index({""time"": ""timestamps""}).reindex(...) ``` (the only difference is the name of the dimension / coordinate you end up with)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1479121713 https://github.com/pydata/xarray/issues/7363#issuecomment-1339450779,https://api.github.com/repos/pydata/xarray/issues/7363,1339450779,IC_kwDOAMm_X85P1mWb,5821660,2022-12-06T14:13:30Z,2022-12-06T14:13:30Z,MEMBER,"You could take the exact time you have and just add the addition times. You even might create those additional ones by giving a timeinterval and the number . I'd need to look up , but I'm currently only on phone.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1479121713 https://github.com/pydata/xarray/issues/7363#issuecomment-1339403307,https://api.github.com/repos/pydata/xarray/issues/7363,1339403307,IC_kwDOAMm_X85P1awr,5821660,2022-12-06T13:39:06Z,2022-12-06T13:39:33Z,MEMBER,"Would [xarray.Dataset.reindex](https://docs.xarray.dev/en/stable/generated/xarray.Dataset.reindex.html) do what you want? You would need to extend you time array/coordinate appropriately and feed it to reindex. Maybe you also need to provide fillvalue keywords to get your need portions filled with the correct fillvalue.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1479121713