diff --git a/src/moscot/_types.py b/src/moscot/_types.py index 3d463c851..024471886 100644 --- a/src/moscot/_types.py +++ b/src/moscot/_types.py @@ -8,7 +8,7 @@ try: from numpy.typing import DTypeLike, NDArray - ArrayLike = NDArray[np.float_] + ArrayLike = NDArray[np.float64] except (ImportError, TypeError): ArrayLike = np.ndarray # type: ignore[misc] DTypeLike = np.dtype # type: ignore[misc] diff --git a/src/moscot/problems/_utils.py b/src/moscot/problems/_utils.py index b2d2658e2..90bbe7aa7 100644 --- a/src/moscot/problems/_utils.py +++ b/src/moscot/problems/_utils.py @@ -37,7 +37,7 @@ def handle_joint_attr( # if this is True we have custom cost matrix or moscot cost - in this case we have a custom cost matrix if joint_attr.get("tag", None) == "cost_matrix" and ( - len(joint_attr) == 2 or kwargs.get("attr", None) == "obsp" + len(joint_attr) == 2 or kwargs.get("attr") == "obsp" ): joint_attr.setdefault("cost", "custom") joint_attr.setdefault("attr", "obsp") diff --git a/src/moscot/problems/cross_modality/_mixins.py b/src/moscot/problems/cross_modality/_mixins.py index 5c2377e19..5a3967e1f 100644 --- a/src/moscot/problems/cross_modality/_mixins.py +++ b/src/moscot/problems/cross_modality/_mixins.py @@ -80,7 +80,7 @@ def _get_features( attr: Dict[str, Any], ) -> ArrayLike: data = getattr(adata, attr["attr"]) - key = attr.get("key", None) + key = attr.get("key") return data if key is None else data[key] if self._src_attr is None: