mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-03 13:08:13 +08:00
X float16 support (#2406)
* float16 support * fix type checks * PR review comments * add tests for custom json encoder; rename and comment for posterity * lint * typos
This commit is contained in:
committed by
Colin Megill
parent
eaae6df5e3
commit
154d099fef
@@ -232,7 +232,7 @@ class AnndataAdaptor(DataAdaptor):
|
||||
"Anndata data matrix is sparse, but not a CSC (columnar) matrix. "
|
||||
"Performance may be improved by using CSC."
|
||||
)
|
||||
if self.data.X.dtype != "float32":
|
||||
if self.data.X.dtype > np.dtype(np.float32):
|
||||
warnings.warn(
|
||||
f"Anndata data matrix is in {self.data.X.dtype} format not float32. " f"Precision may be truncated."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user