File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 2
2
grd2xyz - Convert grid to data table
3
3
"""
4
4
5
- from typing import TYPE_CHECKING , Literal
5
+ from typing import Literal
6
6
7
7
import numpy as np
8
8
import pandas as pd
17
17
validate_output_table_type ,
18
18
)
19
19
20
- if TYPE_CHECKING :
21
- from collections .abc import Hashable
22
-
23
20
__doctest_skip__ = ["grd2xyz" ]
24
21
25
22
@@ -152,11 +149,11 @@ def grd2xyz(
152
149
)
153
150
154
151
# Set the default column names for the pandas dataframe header.
155
- column_names : list [Hashable ] = ["x" , "y" , "z" ]
152
+ column_names : list [str ] = ["x" , "y" , "z" ]
156
153
# Let output pandas column names match input DataArray dimension names
157
154
if output_type == "pandas" and isinstance (grid , xr .DataArray ):
158
155
# Reverse the dims because it is rows, columns ordered.
159
- column_names = [grid .dims [1 ], grid .dims [0 ], grid .name ]
156
+ column_names = [str ( grid .dims [1 ]), str ( grid .dims [0 ]), str ( grid .name ) ]
160
157
161
158
with Session () as lib :
162
159
with (
You can’t perform that action at this time.
0 commit comments