home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 421369237

This data as json

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/pull/2415#issuecomment-421369237 https://api.github.com/repos/pydata/xarray/issues/2415 421369237 MDEyOklzc3VlQ29tbWVudDQyMTM2OTIzNw== 1217238 2018-09-14T14:05:47Z 2018-09-14T14:05:47Z MEMBER

You could pull it out with expected.data.item() On Fri, Sep 14, 2018 at 12:43 AM David Trémouilles notifications@github.com wrote:

@davidtrem commented on this pull request.

In xarray/tests/test_indexing.py https://github.com/pydata/xarray/pull/2415#discussion_r217625779:

@@ -622,3 +622,8 @@ def test_create_mask_error(): def test_posify_mask_subindexer(indices, expected): actual = indexing._posify_mask_subindexer(indices) np.testing.assert_array_equal(expected, actual) + + +def test_indexing_1d_object_array(): + testarray = DataArray(np.array((np.arange(3), np.arange(6)))) + testarray[0]

OK, I get you point :-) Main issue I still have then is that I'm not able to get the 'np.arange(3) array' from the 'expected'... because 'expected.data' is king of empty :-( expected.data.shape == () therefore expected.data[0] raise an IndexError How would you access the content of 'expected' ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/pull/2415#discussion_r217625779, or mute the thread https://github.com/notifications/unsubscribe-auth/ABKS1uZNHXq96w2Dbt50Bw2uBHVxy00-ks5ua14TgaJpZM4Wnb0S .

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  359935048
Powered by Datasette · Queries took 3.393ms · About: xarray-datasette