home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 2189738090

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
2189738090 PR_kwDOAMm_X85p0CKq 8846 Support pandas copy-on-write behaviour 2448579 closed 0     2 2024-03-16T03:14:46Z 2024-03-18T16:00:15Z 2024-03-18T16:00:12Z MEMBER   0 pydata/xarray/pulls/8846
  • [x] Closes #8843
  • [x] Tests added

```python import numpy as np import pandas as pd

pd.set_option("mode.copy_on_write", True)

from xarray.core.variable import _possibly_convert_objects

string_var = np.array(["a", "bc", "def"], dtype=object) datetime_var = np.array( ["2019-01-01", "2019-01-02", "2019-01-03"], dtype="datetime64[ns]" ) assert _possibly_convert_objects(string_var).flags.writeable assert _possibly_convert_objects(datetime_var).flags.writeable ```

The core issue is that we now get read-only arrays back from pandas here: https://github.com/pydata/xarray/blob/fbcac7611bf9a16750678f93483d3dbe0e261a0a/xarray/core/variable.py#L197-L212

@phofl is this expected?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/8846/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 3 rows from issues_id in issues_labels
  • 0 rows from issue in issue_comments
Powered by Datasette · Queries took 0.877ms · About: xarray-datasette