Source code for obnb.feature.singlefeat

"""Single modality feature objects."""

import numpy as np

from obnb.alltypes import Iterable, LogLevel, Optional, Union
from obnb.feature.base import BaseFeature


[docs]class FeatureVec(BaseFeature): """FeatureVec object.""" def __init__( self, dim: Optional[int] = None, log_level: LogLevel = "INFO", verbose: bool = False, ): """Initialize FeatureVec.""" super().__init__(dim, log_level, verbose) def get_featvec_from_idxs( self, idxs: Optional[Union[int, Iterable[int]]], ) -> np.ndarray: raise NotImplementedError
[docs] def get_featvec( self, ids: Optional[Union[str, Iterable[str]]], ) -> np.ndarray: raise NotImplementedError