File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -843,7 +843,7 @@ def polygons_to_cf(
843
843
node_count = part_node_count
844
844
elif len (offsets ) >= 2 :
845
845
indices = np .take (offsets [0 ], offsets [1 ])
846
- interior_ring = np .isin (offsets [0 ], indices , invert = True )[:- 1 ]. view ( np . int8 )
846
+ interior_ring = np .isin (offsets [0 ], indices , invert = True )[:- 1 ]
847
847
848
848
if len (offsets ) == 3 :
849
849
indices = np .take (indices , offsets [2 ])
@@ -874,8 +874,10 @@ def polygons_to_cf(
874
874
ds [names .container_name ].attrs ["part_node_count" ] = names .part_node_count
875
875
876
876
# Special case when we have no holes
877
- if (interior_ring != 0 ).any ():
878
- ds [names .interior_ring ] = xr .DataArray (interior_ring , dims = names .part_dim )
877
+ if interior_ring .any ():
878
+ ds [names .interior_ring ] = xr .DataArray (
879
+ interior_ring .view (np .int8 ), dims = names .part_dim
880
+ )
879
881
ds [names .container_name ].attrs ["interior_ring" ] = names .interior_ring
880
882
return ds
881
883
You can’t perform that action at this time.
0 commit comments