Skip to content

Commit

Permalink
Fix mypy and tests after updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bhky committed Dec 4, 2023
1 parent 4212e7f commit 0d41095
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions targetran/_np_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
from typing import Tuple

import cv2 # type: ignore
import cv2
import numpy as np

from targetran._typing import (
Expand Down Expand Up @@ -80,7 +80,7 @@ def _np_boolean_mask(x: NDAnyArray, mask: NDBoolArray) -> NDAnyArray:
"""
mask: boolean array
"""
return x[mask] # type: ignore
return x[mask]


def _np_gather_image(image: NDFloatArray, indices: NDIntArray) -> NDFloatArray:
Expand Down
2 changes: 1 addition & 1 deletion targetran/np/_np.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _get_mats(
)
else:
conditions = rand_fn() < probs
indices = np.arange(len(probs), dtype=np.int32)[conditions]
indices = np.arange(len(probs), dtype=np.int32)[conditions] # type: ignore

if len(indices) > 1:
if self._keep_order:
Expand Down
Empty file added tests/__init__.py
Empty file.

0 comments on commit 0d41095

Please sign in to comment.