# Assess if normalized or not

**URL:** <https://discourse.scverse.org/t/assess-if-normalized-or-not/84>\
**Category:** scvi-tools\
**Created:** [May 6, 2021, 8:57am UTC](https://discourse.scverse.org/t/assess-if-normalized-or-not/84 "2021-05-06T08:57:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sim](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/sim/32/38_2.png) [@sim](https://discourse.scverse.org/u/sim)\
**Post date:** [May 6, 2021, 8:57am UTC](https://discourse.scverse.org/t/assess-if-normalized-or-not/84/1 "2021-05-06T08:57:13Z")

</div>

Hi,  
we are currently writing some (in-house) code for scRNA and we want to check if the counts are normalized or not. I remember that you raised a flag there if it is normalized.  
How do you do that?  
Which function would it be to check and get some inspiration?

Thanks

---

<div class="post-metadata">

**Author:** ![adamgayoso](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/adamgayoso/32/100_2.png) [@adamgayoso](https://discourse.scverse.org/u/adamgayoso)\
**Post date:** [May 6, 2021, 9:46pm UTC](https://discourse.scverse.org/t/assess-if-normalized-or-not/84/2 "2021-05-06T21:46:09Z")

</div>

You can see what we do [here](https://github.com/YosefLab/scvi-tools/blob/99fbac44842ea043fb992af7b7dba40b7940cd6c/scvi/data/_utils.py#L93-L128).

It’s not cheap to check every entry, especially if it’s a dense matrix. There’s also fancy things you can do with vectorized numba functions, like use them in a numpy style like `array.is_not_count(axis=1)`, but we didn’t go all out with this.
