|
156 | 156 |
|
157 | 157 | import array_api_compat as apc |
158 | 158 | import numpy as np |
159 | | -from numpy.typing import NDArray |
160 | 159 | import matplotlib.pyplot as plt |
161 | 160 | from matplotlib import animation |
162 | 161 | from pint import Quantity |
@@ -388,8 +387,8 @@ class Feature(DeepTrackNode): |
388 | 387 | It binds another feature’s properties as arguments to this feature. |
389 | 388 | `plot( |
390 | 389 | input_image: ( |
391 | | - NDArray |
392 | | - | list[NDArray] |
| 390 | + np.ndarray |
| 391 | + | list[np.ndarray] |
393 | 392 | | torch.Tensor |
394 | 393 | | list[torch.Tensor] |
395 | 394 | | Image |
@@ -1766,12 +1765,10 @@ def bind_arguments( |
1766 | 1765 | def plot( |
1767 | 1766 | self: Feature, |
1768 | 1767 | input_image: ( |
1769 | | - NDArray |
1770 | | - | list[NDArray] |
| 1768 | + np.ndarray |
| 1769 | + | list[np.ndarray] |
1771 | 1770 | | torch.Tensor |
1772 | 1771 | | list[torch.Tensor] |
1773 | | - | Image |
1774 | | - | list[Image] |
1775 | 1772 | ) = None, |
1776 | 1773 | resolve_kwargs: dict = None, |
1777 | 1774 | interval: float = None, |
@@ -7363,7 +7360,7 @@ class LoadImage(Feature): |
7363 | 7360 |
|
7364 | 7361 | Methods |
7365 | 7362 | ------- |
7366 | | - `get(...) -> NDArray | list[NDArray] | torch.Tensor | list[torch.Tensor]` |
| 7363 | + `get(...) -> array or tensor or list of arrays/tensors` |
7367 | 7364 | Load the image(s) from disk and process them. |
7368 | 7365 |
|
7369 | 7366 | Raises |
@@ -7493,7 +7490,7 @@ def get( |
7493 | 7490 | as_list: bool, |
7494 | 7491 | get_one_random: bool, |
7495 | 7492 | **kwargs: Any, |
7496 | | - ) -> NDArray[Any] | torch.Tensor | list[NDArray[Any] | torch.Tensor]: |
| 7493 | + ) -> np.ndarray | torch.Tensor | list[np.ndarray | torch.Tensor]: |
7497 | 7494 | """Load and process an image or a list of images from disk. |
7498 | 7495 |
|
7499 | 7496 | This method attempts to load an image using multiple file readers |
@@ -7983,10 +7980,10 @@ def __init__( |
7983 | 7980 |
|
7984 | 7981 | def get( |
7985 | 7982 | self: Feature, |
7986 | | - image: NDArray | torch.Tensor, |
| 7983 | + image: np.ndarray | torch.Tensor, |
7987 | 7984 | dtype: str, |
7988 | 7985 | **kwargs: Any, |
7989 | | - ) -> NDArray | torch.Tensor: |
| 7986 | + ) -> np.ndarray | torch.Tensor: |
7990 | 7987 | """Convert the data type of the input image. |
7991 | 7988 |
|
7992 | 7989 | Parameters |
@@ -8122,10 +8119,10 @@ def __init__( |
8122 | 8119 |
|
8123 | 8120 | def get( |
8124 | 8121 | self: Feature, |
8125 | | - image: NDArray | torch.Tensor, |
| 8122 | + image: np.ndarray | torch.Tensor, |
8126 | 8123 | axis: int = -1, |
8127 | 8124 | **kwargs: Any, |
8128 | | - ) -> NDArray | torch.Tensor: |
| 8125 | + ) -> np.ndarray | torch.Tensor: |
8129 | 8126 | """Rearrange the axes of an image to channel-first format. |
8130 | 8127 |
|
8131 | 8128 | Rearrange the axes of a 3D image to channel-first format or add a |
|
0 commit comments