Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vovaf709 committed Dec 26, 2023
1 parent 1b7578d commit b5c453a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions imops/interp2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,13 @@ def __init__(

if not isinstance(points, np.ndarray):
raise ValueError(f'Wrong type of `points` argument, expected np.ndarray. Got {type(points)}')

if not isinstance(self.values, np.ndarray):
raise ValueError(f'Wrong type of `values` argument, expected np.ndarray. Got {type(self.values)}')

if self.values.ndim > 1:
raise ValueError(f'Wrong shape of `values` argument, expected ndim=1. Got shape {self.values.shape}')
if values is not None:
if not isinstance(values, np.ndarray):
raise ValueError(f'Wrong type of `values` argument, expected np.ndarray. Got {type(values)}')

if values.ndim > 1:
raise ValueError(f'Wrong shape of `values` argument, expected ndim=1. Got shape {values.shape}')

super().__init__(points, num_threads, triangles)
self.kdtree = KDTree(data=points, **kwargs)
Expand Down

0 comments on commit b5c453a

Please sign in to comment.