Skip to content

Commit

Permalink
Remove union shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Anklesaria committed Jun 24, 2024
1 parent f0cbaa9 commit aca4cca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/contrib/hsgp/test_approximation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from functools import reduce
from operator import mul
from typing import Literal
from typing import Literal, Union

import numpy as np
import pytest
Expand Down Expand Up @@ -140,7 +140,7 @@ def test_kernel_approx_squared_exponential(
def _exact_rbf(length):
return RBF(length)(x1, x2).squeeze(axis=-1)

if isinstance(length, float | int):
if isinstance(length, Union[float, int]):
exact = _exact_rbf(length)
elif length.ndim == 1:
exact = _exact_rbf(length)
Expand Down

0 comments on commit aca4cca

Please sign in to comment.