Skip to content

Commit a423d4b

Browse files
authored
Merge pull request #56 from dailab/55-fix-wrong-typing-after-upgrade
55 fix wrong typing after upgrade
2 parents c37043f + ff9772c commit a423d4b

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "maxi"
3-
version = "0.5.1"
3+
version = "0.5.2"
44
description = "Model-Agnostic Explanation Library"
55
authors = ["Tuan Anh, Le <[email protected]>"]
66
license = "MIT"

src/maxi/lib/inference/inference_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def __call__(self, img: ndarray, *args, **kwargs) -> ndarray:
4444
quantizer method.
4545
4646
Args:
47-
img (NDArray[Int]): Image data in [width, height, channels]
47+
img (ndarray[Int]): Image data in [width, height, channels]
4848
4949
Returns:
50-
NDArray[Float]: Array containing a valued class distribution, N entries for N classes.
50+
ndarray[Float]: Array containing a valued class distribution, N entries for N classes.
5151
"""
5252
return self.quantizer(self.inference_model(self.preprocess(img)))

src/maxi/lib/inference/quantizer/identity_quantizer.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
"""Identity Quantizer Method"""
2-
from typing import Any
3-
from nptyping import NDArray
4-
52
import numpy as np
63

74
from .base_quantizer import BaseQuantizer
@@ -15,13 +12,13 @@ def __init__(self) -> None:
1512
"""
1613
super().__init__()
1714

18-
def __call__(self, prediction: np.ndarray, *args, **kwargs) -> NDArray[Any]:
15+
def __call__(self, prediction: np.ndarray, *args, **kwargs) -> np.ndarray:
1916
"""Returns the resulting annotation as it is.
2017
2118
Args:
2219
prediction (np.ndarray): Arbitrary prediction.
2320
2421
Returns:
25-
NDArray[Any]: The same arbitrary prediction from the input.
22+
ndarray[Any]: The same arbitrary prediction from the input.
2623
"""
2724
return super().__call__(prediction)

0 commit comments

Comments
 (0)