Skip to content
Snippets Groups Projects
Commit 77ffc7f3 authored by Wolfgang Kastaun's avatar Wolfgang Kastaun
Browse files

Fix some type annotations causing mypy problems

parent cae55dbf
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ Use make_dynamic_shift_lagrange_dask to create a Lagrange interpolator for dask
from __future__ import annotations
from typing import Any, Final
from typing import Any, Callable, Final
import dask
import dask.array as da
......@@ -14,7 +14,7 @@ from typing_extensions import assert_never
from lisainstrument.dynamic_delay_numpy import DynShiftBC, DynShiftCfg
from lisainstrument.fir_filters_dask import DaskArray1D, make_dask_array_1d
from lisainstrument.fir_filters_numpy import NumpyArray1D, make_numpy_array_1d
from lisainstrument.fir_filters_numpy import make_numpy_array_1d
from lisainstrument.regular_interpolators import (
RegularInterpolator,
make_regular_interpolator_lagrange,
......@@ -195,11 +195,9 @@ def make_dynamic_shift_lagrange_dask(
def numpyfy_dask_multi(
# ~ dafunc: Callable[[*Any], DaskArray1D],
dafunc: Any,
dafunc: Callable,
chunks: int,
) -> Any:
# ~ ) -> Callable[[*Any], NumpyArray1D]:
) -> Callable[[*Any], np.ndarray]:
"""Convert function operating on 1D dask arrays to work with 1D numpy arrays.
Before calling the dask-based function, all arguments which are numpy
......@@ -214,7 +212,7 @@ def numpyfy_dask_multi(
function operating on numpy arrays
"""
def func(*args: Any) -> NumpyArray1D:
def func(*args: Any) -> np.ndarray:
nargs = [
(da.from_array(x, chunks=chunks) if isinstance(x, np.ndarray) else x)
for x in args
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment