Error with sc.tl.rank_genes_groups : invalid value encountered in log2 self.stats

Hii

Recently I am encountering strange error while running sc.tl.rank_genes_groups, which did not use to happen earlier. I am not sure if this is related to some update or there is issue with the individual datasets.

I am getting the following error :

/.local/lib/python3.10/site-packages/scanpy/tools/_rank_genes_groups.py:420: RuntimeWarning: invalid value encountered in log2
self.stats[group_name, ‘logfoldchanges’] = np.log2(
/.local/lib/python3.10/site-packages/scanpy/tools/_rank_genes_groups.py:420: RuntimeWarning: invalid value encountered in log2
self.stats[group_name, ‘logfoldchanges’] = np.log2(

For reference, I am using the following dataset from GEO : GSE131535

Commands that I used to analyze the data are available here : commands.py · GitHub

Kindly help me to identify the error. I am also getting this error with some other datasets.