Convenience function for returning a 1 dimensional ndarray of values
from X
, layers
[k]
, or obs
.
Made for convenience, not performance.
Intentionally permissive about arguments, for easy iterative use.
- Parameters:
- k
str
Key to use. Should be in var_names
or obs
.columns
.
- layer
str
| None
(default: None
) What layer values should be returned from. If None
, X
is used.
- Return type:
ndarray
- Returns:
A one dimensional ndarray, with values for each obs in the same order
as obs_names
.