@@ -186,7 +186,20 @@ def get_field_data(
186
186
| PathlinesFieldDataRequest
187
187
),
188
188
) -> Dict [int | str , Dict | np .array ]:
189
- """Get the surface, scalar, vector or path-lines field data on a surface."""
189
+ """Get the surface, scalar, vector or path-lines field data on a surface.
190
+
191
+ Returns
192
+ -------
193
+ Dict[int | str, Dict | np.array]
194
+ Field data for the requested surface. If field data is unavailable for the surface,
195
+ an empty array is returned and a warning is issued. Users should always check
196
+ the array size before using the data.
197
+
198
+ Example:
199
+ data = get_field_data(field_data_request)[surface_id]
200
+ if data.size == 0:
201
+ # Handle missing data
202
+ """
190
203
if isinstance (obj , SurfaceFieldDataRequest ):
191
204
return self ._get_surface_data (** obj ._asdict ())
192
205
elif isinstance (obj , ScalarFieldDataRequest ):
@@ -973,7 +986,20 @@ def get_field_data(
973
986
| PathlinesFieldDataRequest
974
987
),
975
988
) -> Dict [int | str , Dict | np .array ]:
976
- """Get the surface, scalar, vector or path-lines field data on a surface."""
989
+ """Get the surface, scalar, vector or path-lines field data on a surface.
990
+
991
+ Returns
992
+ -------
993
+ Dict[int | str, Dict | np.array]
994
+ Field data for the requested surface. If field data is unavailable for the surface,
995
+ an empty array is returned and a warning is issued. Users should always check
996
+ the array size before using the data.
997
+
998
+ Example:
999
+ data = get_field_data(field_data_request)[surface_id]
1000
+ if data.size == 0:
1001
+ # Handle missing data
1002
+ """
977
1003
if isinstance (obj , SurfaceFieldDataRequest ):
978
1004
return self ._get_surface_data (** obj ._asdict ())
979
1005
elif isinstance (obj , ScalarFieldDataRequest ):
0 commit comments