Skip to content

Commit

Permalink
replace pipe operator with union for python 3.9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenDoornbos committed Oct 3, 2024
1 parent d75c6e9 commit d5b12fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions openwfs/algorithms/dual_reference.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional
from typing import Optional, Union

import numpy as np
from numpy import ndarray as nd
Expand Down Expand Up @@ -38,7 +38,7 @@ def __init__(
feedback: Detector,
slm: PhaseSLM,
phase_patterns: Optional[tuple[nd, nd]],
amplitude: Optional[tuple[nd, nd] | str],
amplitude: Optional[Union[tuple[nd, nd], str]],
group_mask: nd,
phase_steps: int = 4,
iterations: int = 2,
Expand Down
4 changes: 2 additions & 2 deletions openwfs/plot_utilities.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Tuple
from typing import Tuple, Union

import numpy as np
from numpy import ndarray as nd
Expand Down Expand Up @@ -56,7 +56,7 @@ def scale_prefix(value: u.Quantity) -> u.Quantity:
return value


def slope_step(a: nd, width: nd | float) -> nd:
def slope_step(a: nd, width: Union[nd, float]) -> nd:
"""
A sloped step function from 0 to 1.
Expand Down

0 comments on commit d5b12fe

Please sign in to comment.