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
Key to use. Should be in obs_names
or var
.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 var in the same order
as var_names
.