# Squidpy calculations on giant data

**URL:** <https://discourse.scverse.org/t/squidpy-calculations-on-giant-data/4041>\
**Category:** squidpy\
**Tags:** developer\
**Created:** [August 4, 2026, 11:16am UTC](https://discourse.scverse.org/t/squidpy-calculations-on-giant-data/4041 "2026-08-04T11:16:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sudden\_Deceleration](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@Sudden\_Deceleration](https://discourse.scverse.org/u/Sudden_Deceleration)\
**Post date:** [August 4, 2026, 11:16am UTC](https://discourse.scverse.org/t/squidpy-calculations-on-giant-data/4041/1 "2026-08-04T11:16:59Z")

</div>

I only today started looking into spatial analysis and squidpy, so please be patient with me if this has an easy answer.

I loaded my data from a whole slide image with 754130 cells, each one carrying a cell type and coordinates (as well as 2 features, although these are randomly generated since I haven’t figured out what they’re used for if I already know the cell type from another source) into the AnnData format.

Visualizing this works fine

 ![a](https://canada1.discourse-cdn.com/flex035/uploads/forum11/original/2X/9/9511eb3984790d1e96fbb34a5668d98d60329831.png)

When trying to calculate stuff from this data, i.e. Ripley’s L:  
`mode = "L" `  
`sq.gr.ripley(adatas[0], cluster_key="cell_type", mode=mode) `  
`sq.pl.ripley(adatas[0], cluster_key="cell_type", mode=mode)`

I get the error `MemoryError: Unable to allocate 1.61 TiB for an array with shape (221285766430,) and data type float64`

Is there a way to handle huge amounts of datapoints to do calculations in squidpy? E.g. dividing the datapoints into chunks and working through them sequentially.
