@@ -148,7 +148,10 @@ def default_dims(self) -> tuple[str, ...]:
148
148
149
149
def __repr__ (self ) -> str :
150
150
out = ["<mikeio.Grid1D>" , _print_axis_txt ("x" , self .x , self .dx )]
151
- return "\n " .join (out )
151
+ txt = "\n " .join (out )
152
+ if self ._axis_name != "x" :
153
+ txt = txt .replace (")" , f", axis_name='{ self ._axis_name } ')" )
154
+ return txt
152
155
153
156
def __str__ (self ) -> str :
154
157
return f"Grid1D (n={ self .nx } , dx={ self .dx :.4g} )"
@@ -1139,10 +1142,11 @@ def __init__(
1139
1142
origin : tuple [float , float ] = (0.0 , 0.0 ),
1140
1143
orientation : float = 0.0 ,
1141
1144
) -> None :
1142
- """Create equidistant 3D spatial geometry
1145
+ """Create equidistant 3D spatial geometry.
1143
1146
1144
1147
Parameters
1145
1148
----------
1149
+
1146
1150
x : array_like, optional
1147
1151
x coordinates of cell centers
1148
1152
x0 : float, optional
@@ -1173,6 +1177,7 @@ def __init__(
1173
1177
user-defined origin, by default (0.0, 0.0)
1174
1178
orientation : float, optional
1175
1179
rotation angle in degrees, by default 0.0
1180
+
1176
1181
"""
1177
1182
super ().__init__ (projection = projection )
1178
1183
self ._origin = (0.0 , 0.0 ) if origin is None else (origin [0 ], origin [1 ])
0 commit comments