Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LISA Instrument
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LISA Simulation
LISA Instrument
Commits
77ffc7f3
Commit
77ffc7f3
authored
3 months ago
by
Wolfgang Kastaun
Browse files
Options
Downloads
Patches
Plain Diff
Fix some type annotations causing mypy problems
parent
cae55dbf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lisainstrument/dynamic_delay_dask.py
+5
-7
5 additions, 7 deletions
lisainstrument/dynamic_delay_dask.py
with
5 additions
and
7 deletions
lisainstrument/dynamic_delay_dask.py
+
5
−
7
View file @
77ffc7f3
...
...
@@ -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
)
->
NumpyA
rray
1D
:
def
func
(
*
args
:
Any
)
->
np
.
nda
rray
:
nargs
=
[
(
da
.
from_array
(
x
,
chunks
=
chunks
)
if
isinstance
(
x
,
np
.
ndarray
)
else
x
)
for
x
in
args
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment