Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tensorflow_graphics/geometry/transformation/axis_angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def from_euler(angles: type_alias.TensorLike,
`[A1, ..., An, 1]`, where the first tensor represents the axis, and the
second represents the angle. The resulting axis is a normalized vector.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion = quaternion_lib.from_euler(angles)
return from_quaternion(quaternion)

Expand Down Expand Up @@ -109,7 +109,7 @@ def from_euler_with_small_angles_approximation(
`[A1, ..., An, 1]`, where the first tensor represents the axis, and the
second represents the angle. The resulting axis is a normalized vector.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion = quaternion_lib.from_euler_with_small_angles_approximation(
angles)
return from_quaternion(quaternion)
Expand All @@ -136,7 +136,7 @@ def from_quaternion(quaternion: type_alias.TensorLike,
Raises:
ValueError: If the shape of `quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion = tf.convert_to_tensor(value=quaternion)

shape.check_static(
Expand Down Expand Up @@ -180,7 +180,7 @@ def from_rotation_matrix(rotation_matrix: type_alias.TensorLike,
Raises:
ValueError: If the shape of `rotation_matrix` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
rotation_matrix = tf.convert_to_tensor(value=rotation_matrix)

shape.check_static(
Expand Down Expand Up @@ -218,7 +218,7 @@ def inverse(axis: type_alias.TensorLike,
Raises:
ValueError: If the shape of `axis` or `angle` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
axis = tf.convert_to_tensor(value=axis)
angle = tf.convert_to_tensor(value=angle)

Expand Down Expand Up @@ -256,7 +256,7 @@ def is_normalized(axis: type_alias.TensorLike,
A tensor of shape `[A1, ..., An, 1]`, where False indicates that the axis is
not normalized.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
axis = tf.convert_to_tensor(value=axis)
angle = tf.convert_to_tensor(value=angle)

Expand Down Expand Up @@ -305,7 +305,7 @@ def rotate(point: type_alias.TensorLike,
ValueError: If `point`, `axis`, or `angle` are of different shape or if
their respective shape is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
point = tf.convert_to_tensor(value=point)
axis = tf.convert_to_tensor(value=axis)
angle = tf.convert_to_tensor(value=angle)
Expand Down
20 changes: 10 additions & 10 deletions tensorflow_graphics/geometry/transformation/dual_quaternion.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def conjugate(dual_quaternion: type_alias.TensorLike,
Raises:
ValueError: If the shape of `dual_quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)

shape.check_static(
Expand Down Expand Up @@ -97,7 +97,7 @@ def multiply(dual_quaternion1: type_alias.TensorLike,
Returns:
A tensor of shape `[A1, ..., An, 8]` representing dual quaternions.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
dual_quaternion1 = tf.convert_to_tensor(value=dual_quaternion1)
dual_quaternion2 = tf.convert_to_tensor(value=dual_quaternion2)

Expand Down Expand Up @@ -144,7 +144,7 @@ def inverse(dual_quaternion: type_alias.TensorLike,
Raises:
ValueError: If the shape of `dual quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)

shape.check_static(
Expand Down Expand Up @@ -193,7 +193,7 @@ def norm(dual_quaternion: type_alias.TensorLike,
Raises:
ValueError: If the shape of `dual quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)

shape.check_static(
Expand Down Expand Up @@ -234,7 +234,7 @@ def is_normalized(dual_quaternion: type_alias.TensorLike,
Raises:
ValueError: If the shape of `dual_quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)

shape.check_static(
Expand Down Expand Up @@ -278,7 +278,7 @@ def from_rotation_translation(
Raises:
ValueError: If the shape of `rotation_matrix` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
rotation_quaternion = tf.convert_to_tensor(value=rotation_quaternion)
translation_vector = tf.convert_to_tensor(value=translation_vector)

Expand Down Expand Up @@ -319,7 +319,7 @@ def to_rotation_translation(
A tuple with a `[A1, ..., An, 4]`-tensor for rotation in quaternion form,
and a `[A1, ..., An, 3]`-tensor for translation, in that order.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)

shape.check_static(
Expand Down Expand Up @@ -362,7 +362,7 @@ def from_axis_angle_translation(axis: type_alias.TensorLike,
ValueError: If the shape of `axis`, `angle`, or `translation_vector`
is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
axis = tf.convert_to_tensor(value=axis)
angle = tf.convert_to_tensor(value=angle)
translation_vector = tf.convert_to_tensor(value=translation_vector)
Expand Down Expand Up @@ -415,7 +415,7 @@ def conjugate_dual(
Raises:
ValueError: If the shape of `dual_quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
dual_quaternion = tf.convert_to_tensor(value=dual_quaternion)

shape.check_static(
Expand All @@ -442,7 +442,7 @@ def point_to_dual_quaternion(
Returns:
The dual quaternion representation of `point`.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
point = tf.convert_to_tensor(value=point)

shape.check_static(
Expand Down
8 changes: 4 additions & 4 deletions tensorflow_graphics/geometry/transformation/euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def from_axis_angle(axis: type_alias.TensorLike,
A tensor of shape `[A1, ..., An, 3]`, where the last dimension represents
the three Euler angles.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
return from_quaternion(quaternion.from_axis_angle(axis, angle))


Expand Down Expand Up @@ -98,7 +98,7 @@ def gimbal_lock(r01, r02, r20, eps_addition):
angles = tf.stack((theta_x, theta_y, theta_z), axis=-1)
return angles

with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternions = tf.convert_to_tensor(value=quaternions)

shape.check_static(
Expand Down Expand Up @@ -193,7 +193,7 @@ def gimbal_lock(rotation_matrix, r20, eps_addition):
angles = tf.stack((theta_x, theta_y, theta_z), axis=-1)
return angles

with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
rotation_matrix = tf.convert_to_tensor(value=rotation_matrix)

shape.check_static(
Expand Down Expand Up @@ -232,7 +232,7 @@ def inverse(euler_angle: type_alias.TensorLike,
Raises:
ValueError: If the shape of `euler_angle` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
euler_angle = tf.convert_to_tensor(value=euler_angle)

shape.check_static(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def blend(points: type_alias.TensorLike,
Raises:
ValueError: If the shape of the input tensors are not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
points = tf.convert_to_tensor(value=points)
skinning_weights = tf.convert_to_tensor(value=skinning_weights)
bone_rotations = tf.convert_to_tensor(value=bone_rotations)
Expand Down
2 changes: 1 addition & 1 deletion tensorflow_graphics/geometry/transformation/look_at.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def right_handed(camera_position: type_alias.TensorLike,
A tensor of shape `[A1, ..., An, 4, 4]`, containing right handed look at
matrices.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
camera_position = tf.convert_to_tensor(value=camera_position)
look_at = tf.convert_to_tensor(value=look_at)
up_vector = tf.convert_to_tensor(value=up_vector)
Expand Down
26 changes: 13 additions & 13 deletions tensorflow_graphics/geometry/transformation/quaternion.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def between_two_vectors_3d(vector1: type_alias.TensorLike,
Raises:
ValueError: If the shape of `vector1` or `vector2` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
vector1 = tf.convert_to_tensor(value=vector1)
vector2 = tf.convert_to_tensor(value=vector2)

Expand Down Expand Up @@ -154,7 +154,7 @@ def conjugate(quaternion: type_alias.TensorLike,
Raises:
ValueError: If the shape of `quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion = tf.convert_to_tensor(value=quaternion)

shape.check_static(
Expand Down Expand Up @@ -187,7 +187,7 @@ def from_axis_angle(axis: type_alias.TensorLike,
Raises:
ValueError: If the shape of `axis` or `angle` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
axis = tf.convert_to_tensor(value=axis)
angle = tf.convert_to_tensor(value=angle)

Expand Down Expand Up @@ -229,7 +229,7 @@ def from_euler(angles: type_alias.TensorLike,
Raises:
ValueError: If the shape of `angles` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
angles = tf.convert_to_tensor(value=angles)

shape.check_static(
Expand Down Expand Up @@ -272,7 +272,7 @@ def from_euler_with_small_angles_approximation(
Raises:
ValueError: If the shape of `angles` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
angles = tf.convert_to_tensor(value=angles)

shape.check_static(
Expand Down Expand Up @@ -310,7 +310,7 @@ def from_rotation_matrix(rotation_matrix: type_alias.TensorLike,
Raises:
ValueError: If the shape of `rotation_matrix` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
rotation_matrix = tf.convert_to_tensor(value=rotation_matrix)

shape.check_static(
Expand Down Expand Up @@ -395,7 +395,7 @@ def inverse(quaternion: type_alias.TensorLike,
Raises:
ValueError: If the shape of `quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion = tf.convert_to_tensor(value=quaternion)

shape.check_static(
Expand Down Expand Up @@ -429,7 +429,7 @@ def is_normalized(quaternion: type_alias.TensorLike,
Raises:
ValueError: If the shape of `quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion = tf.convert_to_tensor(value=quaternion)

shape.check_static(
Expand Down Expand Up @@ -463,7 +463,7 @@ def normalize(quaternion: type_alias.TensorLike,
Raises:
ValueError: If the shape of `quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion = tf.convert_to_tensor(value=quaternion)

shape.check_static(
Expand Down Expand Up @@ -494,7 +494,7 @@ def multiply(quaternion1: type_alias.TensorLike,
Raises:
ValueError: If the shape of `quaternion1` or `quaternion2` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion1 = tf.convert_to_tensor(value=quaternion1)
quaternion2 = tf.convert_to_tensor(value=quaternion2)

Expand Down Expand Up @@ -526,7 +526,7 @@ def normalized_random_uniform(quaternion_shape: List[int],
A tensor of shape `[quaternion_shape[0],...,quaternion_shape[-1], 4]`
representing random normalized quaternions.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion_shape = tf.convert_to_tensor(
value=quaternion_shape, dtype=tf.int32)
quaternion_shape = tf.concat((quaternion_shape, tf.constant([4])), axis=0)
Expand Down Expand Up @@ -594,7 +594,7 @@ def rotate(point: type_alias.TensorLike,
Raises:
ValueError: If the shape of `point` or `quaternion` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
point = tf.convert_to_tensor(value=point)
quaternion = tf.convert_to_tensor(value=quaternion)

Expand Down Expand Up @@ -642,7 +642,7 @@ def relative_angle(quaternion1: type_alias.TensorLike,
Raises:
ValueError: If the shape of `quaternion1` or `quaternion2` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
quaternion1 = tf.convert_to_tensor(value=quaternion1)
quaternion2 = tf.convert_to_tensor(value=quaternion2)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def from_euler(angle: type_alias.TensorLike,
Raises:
ValueError: If the shape of `angle` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
angle = tf.convert_to_tensor(value=angle)

shape.check_static(
Expand Down Expand Up @@ -132,7 +132,7 @@ def from_euler_with_small_angles_approximation(
Raises:
ValueError: If the shape of `angle` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
angles = tf.convert_to_tensor(value=angles)

shape.check_static(
Expand Down Expand Up @@ -166,7 +166,7 @@ def inverse(matrix: type_alias.TensorLike,
Raises:
ValueError: If the shape of `matrix` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
matrix = tf.convert_to_tensor(value=matrix)

shape.check_static(
Expand Down Expand Up @@ -201,7 +201,7 @@ def is_valid(matrix: type_alias.TensorLike,
A tensor of type `bool` and shape `[A1, ..., An, 1]` where False indicates
that the input is not a valid rotation matrix.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
matrix = tf.convert_to_tensor(value=matrix)

shape.check_static(
Expand Down Expand Up @@ -236,7 +236,7 @@ def rotate(point: type_alias.TensorLike,
Raises:
ValueError: If the shape of `point` or `matrix` is not supported.
"""
with tf.name_scope(name): # pyrefly: ignore[bad-instantiation]
with tf.name_scope(name):
point = tf.convert_to_tensor(value=point)
matrix = tf.convert_to_tensor(value=matrix)

Expand Down
Loading
Loading