Skip to content

Commit

Permalink
Merge branch 'ershi/typo-fixes' into 'main'
Browse files Browse the repository at this point in the history
Fix typo "initializating"

See merge request omniverse/warp!620
  • Loading branch information
shi-eric committed Jul 12, 2024
2 parents 69c5b8b + f20c721 commit 07568a5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions warp/builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ def vector_value_func(arg_types: Mapping[str, type], arg_values: Mapping[str, An
if variadic_arg_count == 0:
# Zero-initialization, e.g.: `wp.vecXX()`, `wp.vector(length=2, dtype=wp.float16)`.
if length is None:
raise RuntimeError("the `length` argument must be specified when zero-initializating a vector")
raise RuntimeError("the `length` argument must be specified when zero-initializing a vector")

if dtype is None:
dtype = float32
Expand Down Expand Up @@ -880,7 +880,7 @@ def matrix_value_func(arg_types: Mapping[str, type], arg_values: Mapping[str, An
if variadic_arg_count == 0:
# Zero-initialization, e.g.: `wp.matXX()`, `wp.matrix(shape=(2, 2), dtype=wp.float16)`.
if shape is None:
raise RuntimeError("the `shape` argument must be specified when zero-initializating a matrix")
raise RuntimeError("the `shape` argument must be specified when zero-initializing a matrix")

if dtype is None:
dtype = float32
Expand Down Expand Up @@ -913,7 +913,7 @@ def matrix_value_func(arg_types: Mapping[str, type], arg_values: Mapping[str, An
else:
# Initializing by value, e.g.: `wp.mat22(1, 2, 3, 4)`, `wp.matrix(1, 2, 3, 4, shape=(2, 2))`.
if shape is None:
raise RuntimeError("the `shape` argument must be specified when initializating a matrix by value")
raise RuntimeError("the `shape` argument must be specified when initializing a matrix by value")

if all(type_is_vector(x) for x in variadic_arg_types):
if shape[1] != variadic_arg_count:
Expand Down
2 changes: 1 addition & 1 deletion warp/tests/test_mat.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def kernel():

with test.assertRaisesRegex(
RuntimeError,
r"the `shape` argument must be specified when initializating a matrix by value$",
r"the `shape` argument must be specified when initializing a matrix by value$",
):
wp.launch(
kernel,
Expand Down
2 changes: 1 addition & 1 deletion warp/tests/test_vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def kernel():

with test.assertRaisesRegex(
RuntimeError,
r"the `length` argument must be specified when zero-initializating a vector$",
r"the `length` argument must be specified when zero-initializing a vector$",
):
wp.launch(
kernel,
Expand Down

0 comments on commit 07568a5

Please sign in to comment.