File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -400,7 +400,7 @@ def decode_cf_variable(
400
400
encoding .setdefault ("dtype" , original_dtype )
401
401
402
402
if "dtype" in attributes and attributes ["dtype" ] == "bool" :
403
- del attributes ["dtype" ]
403
+ encoding ["dtype" ] = attributes . pop ( "dtype" )
404
404
data = BoolTypeArray (data )
405
405
406
406
if not is_duck_dask_array (data ):
Original file line number Diff line number Diff line change @@ -632,6 +632,7 @@ def test_roundtrip_boolean_dtype(self) -> None:
632
632
with self .roundtrip (original ) as actual :
633
633
assert_identical (original , actual )
634
634
assert actual ["x" ].dtype == "bool"
635
+ assert actual ["x" ].encoding ["dtype" ] == "bool"
635
636
636
637
def test_orthogonal_indexing (self ) -> None :
637
638
in_memory = create_test_data ()
You can’t perform that action at this time.
0 commit comments