Commit 8f9dbfa 1 parent 1fd117e commit 8f9dbfa Copy full SHA for 8f9dbfa
File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1182,17 +1182,26 @@ def to_anndata(self):
1182
1182
from anndata import AnnData
1183
1183
from delayedarray import (
1184
1184
DelayedArray ,
1185
- to_scipy_sparse_matrix ,
1186
- to_dense_array ,
1187
1185
is_sparse ,
1186
+ to_dense_array ,
1187
+ to_scipy_sparse_matrix ,
1188
1188
)
1189
1189
1190
1190
layers = OrderedDict ()
1191
1191
for asy , mat in self .assays .items ():
1192
1192
if isinstance (mat , DelayedArray ) or issubclass (type (mat ), DelayedArray ):
1193
1193
if is_sparse (mat ):
1194
+ warnings .warn (
1195
+ "Converting delayedarray into sparse, may require more memory" ,
1196
+ RuntimeWarning ,
1197
+ )
1198
+
1194
1199
mat = to_scipy_sparse_matrix (mat )
1195
1200
else :
1201
+ warnings .warn (
1202
+ "Converting delayedarray into dense, may require more memory" ,
1203
+ RuntimeWarning ,
1204
+ )
1196
1205
mat = to_dense_array (mat )
1197
1206
1198
1207
layers [asy ] = mat .transpose ()
You can’t perform that action at this time.
0 commit comments