File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,9 @@ Breaking changes
39
39
the default behaviour of :py:func: `open_mfdataset ` has changed to use
40
40
``combine='by_coords' `` as the default argument value. (:issue: `2616 `, :pull: `3926 `)
41
41
By `Tom Nicholas <https://github.com/TomNicholas >`_.
42
-
42
+ - The ``DataArray `` and ``Variable `` HTML reprs now expand the data section by
43
+ default (:issue: `4176 `)
44
+ By `Stephan Hoyer <https://github.com/shoyer >`_.
43
45
44
46
Enhancements
45
47
~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ def dim_section(obj):
184
184
def array_section (obj ):
185
185
# "unique" id to expand/collapse the section
186
186
data_id = "section-" + str (uuid .uuid4 ())
187
- collapsed = ""
187
+ collapsed = "checked "
188
188
variable = getattr (obj , "variable" , obj )
189
189
preview = escape (inline_variable_array_repr (variable , max_width = 70 ))
190
190
data_repr = short_data_repr_html (obj )
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ def test_summarize_attrs_with_unsafe_attr_name_and_value():
108
108
def test_repr_of_dataarray (dataarray ):
109
109
formatted = fh .array_repr (dataarray )
110
110
assert "dim_0" in formatted
111
- # has an expandable data section
112
- assert formatted .count ("class='xr-array-in' type='checkbox' >" ) == 1
111
+ # has an expanded data section
112
+ assert formatted .count ("class='xr-array-in' type='checkbox' checked >" ) == 1
113
113
# coords and attrs don't have an items so they'll be be disabled and collapsed
114
114
assert (
115
115
formatted .count ("class='xr-section-summary-in' type='checkbox' disabled >" ) == 2
You can’t perform that action at this time.
0 commit comments