Issue with logfoldchanges in

Hello, I am having problems with the logfoldchanges when running in my single cell RNA sequencing analysis. I am getting the following error:

RuntimeWarning: invalid value encountered in log2 self.stats[group_name, ‘logfoldchanges’] = np.log2(

Then when I try to see the values they are all nan. Your help is much appreciated. Thank you.

Hello @hbaker,

what count matrix are you using when using ? expects logarithmized data.
Did you use scanpy.pp.log1p to do such transformation on your CPM counts first ?

Have you looked to this issue: Runtime warning by rank_genes_groups · Issue #653 · scverse/scanpy · GitHub ?