Skip to content

Commit

Permalink
Fix read_dataframe to not return a list
Browse files Browse the repository at this point in the history
  • Loading branch information
kboone committed May 17, 2019
1 parent 72ab54f commit acfcfa4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions avocado/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
from sklearn.model_selection import StratifiedKFold

from .astronomical_object import AstronomicalObject
from .utils import logger, AvocadoException, write_dataframe, read_dataframes
from .utils import logger, AvocadoException, write_dataframe, \
read_dataframes, read_dataframe
from .settings import settings

class Dataset():
"""Class representing a dataset of many astronomical objects.
Parameters
----------
name : str
Expand Down Expand Up @@ -279,7 +280,7 @@ def _get_object(self, index=None, category=None, object_id=None, **kwargs):
of the dataset and doing additional processing on it. The arguments
used by get_object are removed from the arguments list, and the
remainder are returned. See `get_object` for details of the parameters.
Returns
=======
astronomical_object : AstronomicalObject
Expand Down Expand Up @@ -449,7 +450,7 @@ def write_raw_features(self, tag=None, **kwargs):
**kwargs
)

def load_raw_features(self, tag=None):
def load_raw_features(self, tag=None, **kwargs):
"""Load the raw features from disk.
Parameters
Expand Down
2 changes: 1 addition & 1 deletion avocado/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,4 +380,4 @@ def read_dataframe(path, key, *args, **kwargs):
This is just a thin wrapper around read_dataframes.
"""
return read_dataframes(path, [key], **kwargs)
return read_dataframes(path, [key], **kwargs)[0]

0 comments on commit acfcfa4

Please sign in to comment.