Skip to content

Commit

Permalink
Merge pull request #20 from benoitblanc/master
Browse files Browse the repository at this point in the history
Fix issue #19 : check for position is defined when transforming it
  • Loading branch information
koenvo authored Jun 13, 2020
2 parents ad24c90 + ae1bcc0 commit 1fca251
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kloppy/domain/services/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def __init__(self,
def transform_point(self, point: Point, flip: bool) -> Point:
# 1. always apply changes from coordinate system
# 2. flip coordinates depending on orientation
if point is None:
return None
x_base = self._from_pitch_dimensions.x_dim.to_base(point.x)
y_base = self._from_pitch_dimensions.y_dim.to_base(point.y)

Expand Down

0 comments on commit 1fca251

Please sign in to comment.