bioalpha.h5ad_map.H5ADMap.obs_vector

H5ADMap.obs_vector(k: str, *, layer: str | None = None) ndarray

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.

Params

k

Key to use. Should be in var_names or obs.columns.

layer

What layer values should be returned from. If None, X is used.

returns:
  • A one dimensional nd array, with values for each obs in the same order

  • as obs_names.