Skip to content

Commit

Permalink
Merge pull request #58 from eminyous:add-scale-to-load
Browse files Browse the repository at this point in the history
Add scale parameter to Loader.load method
  • Loading branch information
eminyous authored Feb 13, 2025
2 parents 0428454 + 5cb1b77 commit f6707e7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ocean/datasets/_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,24 @@ def load(
self,
name: str,
*,
scale: bool = False,
return_mapper: Literal[True] = True,
) -> Loaded: ...

@overload
def load(self, name: str, *, return_mapper: Literal[False]) -> Dataset: ...
def load(
self,
name: str,
*,
scale: bool = False,
return_mapper: Literal[False],
) -> Dataset: ...

def load(
self,
name: str,
*,
scale: bool = False,
return_mapper: bool = True,
) -> Dataset | Loaded:
path = f"{name}/{name}.csv"
Expand All @@ -45,7 +53,7 @@ def load(
data,
discretes=discretes,
encoded=encoded,
scale=False,
scale=scale,
)

if return_mapper:
Expand Down

0 comments on commit f6707e7

Please sign in to comment.