Skip to content

Commit

Permalink
feat: make backend query case-insensitive.
Browse files Browse the repository at this point in the history
  • Loading branch information
paquiteau committed Jan 8, 2024
1 parent 53a6357 commit 1c04fb3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mrinufft/operators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

def check_backend(backend_name: str):
"""Check if a specific backend is available."""
backend_name = backend_name.lower()
try:
return FourierOperatorBase.interfaces[backend_name][0]
except KeyError as e:
Expand Down Expand Up @@ -60,6 +61,7 @@ class or instance of class if args or kwargs are given.
ValueError if the backend is not available.
"""
available = True
backend_name = backend_name.lower()
try:
available, operator = FourierOperatorBase.interfaces[backend_name]
except KeyError as exc:
Expand Down

0 comments on commit 1c04fb3

Please sign in to comment.