From c73f1b52e3b7a1f219c176766879437d7910ac07 Mon Sep 17 00:00:00 2001
From: Martin Lange <martin.lange@ufz.de>
Date: Sat, 3 Dec 2022 14:28:21 +0100
Subject: [PATCH] don't check for equivalent units in inputs

---
 src/finam/data/tools.py | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/finam/data/tools.py b/src/finam/data/tools.py
index 397f2784..7fcc514e 100644
--- a/src/finam/data/tools.py
+++ b/src/finam/data/tools.py
@@ -87,7 +87,6 @@ def to_xarray(data, name, info, time_entries=1, force_copy=False):
             name=name,
             info=info,
             overwrite_name=True,
-            check_units_equivalent=False,
         )
         if equivalent_units(info.units, data):
             if force_copy:
@@ -383,7 +382,6 @@ def check(
     name,
     info,
     overwrite_name=False,
-    check_units_equivalent=True,
 ):
     """
     Check if data matches given info.
@@ -398,8 +396,6 @@ def check(
         Info associated with the data.
     overwrite_name : bool
         Overwrites the name in the data instead of comparing both names
-    check_units_equivalent : bool
-        Check equivalence of data and info units.
 
     Raises
     ------
@@ -443,11 +439,6 @@ def check(
             f"check: given data has incompatible units. "
             f"Got {get_units(xdata)}, expected {units}."
         )
-    if check_units_equivalent and not equivalent_units(units, xdata):
-        raise FinamDataError(
-            f"check: given data has non-equivalent units. "
-            f"Got {get_units(xdata)}, expected {units}."
-        )
 
 
 def _check_shape(xdata, grid):
-- 
GitLab