Skip to content

Commit

Permalink
Add nprocs for backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed Feb 15, 2024
1 parent 9e01765 commit d6df3a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyresample/future/geometry/swath.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class SwathDefinition(LegacySwathDefinition):
lats : numpy array
crs: pyproj.CRS,
The CRS to use. longlat on WGS84 by default.
nprocs : int, optional
Number of processor cores to be used for calculations.
attrs: dict,
A dictionary made to store metadata.
Expand All @@ -51,6 +53,6 @@ class SwathDefinition(LegacySwathDefinition):
Swath cartesian coordinates
"""

def __init__(self, lons, lats, crs=None, attrs=None):
super().__init__(lons, lats, crs=crs)
def __init__(self, lons, lats, crs=None, nprocs=1, attrs=None):
super().__init__(lons, lats, crs=crs, nprocs=nprocs)
self.attrs = attrs or {}

0 comments on commit d6df3a6

Please sign in to comment.