codekingpro/portable-devtools
114k
1from collections.abc import Callable
2from typing import Any
3
4import numpy as np
5import numpy.typing as npt
6
7AR: npt.NDArray[np.float64]
8func1: Callable[[Any], str]
9func2: Callable[[np.integer], str]
10
11np.array2string(AR, legacy="1.14") # type: ignore[arg-type]
12np.array2string(AR, sign="*") # type: ignore[arg-type]
13np.array2string(AR, floatmode="default") # type: ignore[arg-type]
14np.array2string(AR, formatter={"A": func1}) # type: ignore[arg-type]
15np.array2string(AR, formatter={"float": func2}) # type: ignore[arg-type]
16 