pegasusio/unimodal_data.py
def register_attr(self, attr: str, attr_type: str = None) -> None:
        """ Register an attribute (either in obs or obsm) with an attr_type (e.g. signature, cluster, basis, knn). Default is None (no attr_type or pop up)
        """
        if attr_type is None:
            if "_attr2type" in self.metadata:
                self.metadata["_attr2type"].pop(attr, None)
        else:
            if "_attr2type" not in self.metadata:
                self.metadata["_attr2type"] = dict()
            self.metadata["_attr2type"][attr] = attr_type
 Register an attribute (either in obs or obsm) with an attr_type (e.g. signature, cluster, basis, knn). Default is None (no attr_type or pop up)
        
Register an attribute (either in obs or obsm) with an attr_type . Default is None (no attr_type or pop up)
Register an attribute ( either in obs or obsm ) with an attr_type . Default is None ( no attr_type or pop up )
def register_attr(self, attr: str, attr_type: str = None) -> None:
        if attr_type is None:
            if "_attr2type" in self.metadata:
                self.metadata["_attr2type"].pop(attr, None)
        else:
            if "_attr2type" not in self.metadata:
                self.metadata["_attr2type"] = dict()
            self.metadata["_attr2type"][attr] = attr_type
def register_attr ( self , attr : str , attr_type : str = None ) -> None : if attr_type is None : if "_attr2type" in self . metadata : self . metadata [ "_attr2type" ] . pop ( attr , None ) else : if "_attr2type" not in self . metadata : self . metadata [ "_attr2type" ] = dict ( ) self . metadata [ "_attr2type" ] [ attr ] = attr_type
Register an attribute (either in obs or obsm) with an attr_type (e.g.
Register an attribute ( either in obs or obsm ) with an attr_type ( e . g .
""" Register an attribute (either in obs or obsm) with an attr_type (e.g. signature, cluster, basis, knn). Default is None (no attr_type or pop up)
        """
self
attr
str
attr_type
str