Skip to content

Commit

Permalink
Fix numpy 2.0 test failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed May 30, 2024
1 parent 986c47f commit 3e0b75f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions fresnel/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ def __init__(self, position, look_at, up, height):
def __repr__(self):
"""str: Representation of the camera."""
s = "fresnel.camera.Orthographic("
s += f"position={tuple(self.position)}, "
s += f"look_at={tuple(self.look_at)}, "
s += f"up={tuple(self.up)}, "
s += f"position={tuple([float(x) for x in self.position])}, "
s += f"look_at={tuple([float(x) for x in self.look_at])}, "
s += f"up={tuple([float(x) for x in self.up])}, "
s += f"height={self.height})"
return s

Expand Down Expand Up @@ -418,13 +418,13 @@ def __init__(
def __repr__(self):
"""str: Representation of the camera."""
s = "fresnel.camera.Perspective("
s += f"position={tuple(self.position)}, "
s += f"look_at={tuple(self.look_at)}, "
s += f"up={tuple(self.up)}, "
s += f"focus_distance={self.focus_distance}, "
s += f"focal_length={self.focal_length}, "
s += f"f_stop={self.f_stop}, "
s += f"height={self.height})"
s += f"position={tuple([float(x) for x in self.position])}, "
s += f"look_at={tuple([float(x) for x in self.look_at])}, "
s += f"up={tuple([float(x) for x in self.up])}, "
s += f"focus_distance={float(self.focus_distance)}, "
s += f"focal_length={float(self.focal_length)}, "
s += f"f_stop={float(self.f_stop)}, "
s += f"height={float(self.height)})"
return s

@property
Expand Down

0 comments on commit 3e0b75f

Please sign in to comment.