Skip to content

Commit

Permalink
update docstring tests for numpy 2.0 (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaS11 authored Jul 24, 2024
1 parent 2c924b0 commit b4582df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions icepyx/core/is2ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ def _default_varlists(product):
return common_list


# Currently this function is used one-off, but if it needs to be done for a series of values,
# a faster version using pandas map (instead of apply) is available in SlideRule:
# https://github.com/SlideRuleEarth/sliderule/issues/388
# https://github.com/SlideRuleEarth/sliderule/commit/46cceac0e5f6d0a580933d399a6239bc911757f3
def gt2spot(gt, sc_orient):
warnings.warn(
"icepyx versions 0.8.0 and earlier used an incorrect spot number calculation."
Expand Down
2 changes: 1 addition & 1 deletion icepyx/core/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ def avail_granules(self, ids=False, cycles=False, tracks=False, cloud=False):
>>> reg_a = ipx.Query('ATL06',[-55, 68, -48, 71],['2019-02-20','2019-02-28'])
>>> reg_a.avail_granules()
{'Number of available granules': 4,
'Average size of granules (MB)': 55.166646003723145,
'Average size of granules (MB)': np.float64(55.166646003723145),
'Total size of all granules (MB)': 220.66658401489258}
>>> reg_a = ipx.Query('ATL06',[-55, 68, -48, 71],['2019-02-20','2019-02-23'])
Expand Down
2 changes: 1 addition & 1 deletion icepyx/core/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def geodataframe(extent_type, spatial_extent, file=False, xdateline=None):
>>> reg_a = ipx.Query('ATL06',[-55, 68, -48, 71],['2019-02-20','2019-02-28'])
>>> gdf = geodataframe(reg_a.spatial.extent_type, reg_a.spatial.extent)
>>> gdf.geometry
0 POLYGON ((-48.00000 68.00000, -48.00000 71.000...
0 POLYGON ((-48 68, -48 71, -55 71, -55 68, -48 ...
Name: geometry, dtype: geometry
"""

Expand Down

0 comments on commit b4582df

Please sign in to comment.