Skip to content

Commit

Permalink
Address reviews from @wasade
Browse files Browse the repository at this point in the history
  • Loading branch information
ElDeveloper committed Oct 2, 2019
1 parent 490afbd commit bd38e56
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions emperor/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Emperor(object):
identifiers as the identifiers in ``ordination``.
ignore_missing_samples: bool, optional
If set to `True` samples and features without metadata are included by
setting all metadata values to: ``This element has not metadata``. By
setting all metadata values to: ``This element has no metadata``. By
default an exception will be raised if missing elements are
encountered. Note, this flag only takes effect if there's at least one
overlapping element.
Expand Down Expand Up @@ -337,10 +337,9 @@ def _validate_metadata(self, metadata, matrix, ignore_missing_samples,
EmperorWarning)

# pad the missing elements
data = np.full((len(difference), metadata.shape[1]),
'This element has no metadata', dtype='<U28')
pad = pd.DataFrame(index=difference, columns=metadata.columns,
data=data)
dtype=str)
pad.fillna('This element has no metadata', inplace=True)
metadata = pd.concat([metadata, pad])

# filter all metadata that we may have for which we don't have any
Expand Down

0 comments on commit bd38e56

Please sign in to comment.