Skip to content

Commit

Permalink
fix: Fixed few missing mandatory key-word arguments (#27139)
Browse files Browse the repository at this point in the history
Co-authored-by: vedpatwardhan <vedpat3@gmail.com>
  • Loading branch information
Sai-Suraj-27 and vedpatwardhan authored Oct 27, 2023
1 parent f3a0444 commit 86c3a75
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion ivy/functional/backends/paddle/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ def _linspace_helper(start, stop, num, axis=None, *, dtype=None):
sos_shape = stop_shape
if num == 1:
return (
paddle_backend.ones(stop_shape[:axis] + [1] + stop_shape[axis:]) * start
paddle_backend.ones(
stop_shape[:axis] + [1] + stop_shape[axis:], dtype=dtype
)
* start
)
stop = stop.reshape((-1,))
linspace_method = (
Expand Down
2 changes: 1 addition & 1 deletion ivy/functional/backends/torch/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ def ones_like_v_0p1p12_to_0p2p0(
x[i] = 1
return x
for i in range(x.shape[0]):
x[i, :] = ones_like_v_0p1p12_to_0p2p0(x[i, :])
x[i, :] = ones_like_v_0p1p12_to_0p2p0(x[i, :], dtype=dtype)
return x


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2703,6 +2703,7 @@ def test_numpy_instance_ilshift__(
init_all_as_kwargs_np={
"object": x[0],
},
method_input_dtypes=input_dtypes,
backend_to_test=backend_fw,
method_all_as_kwargs_np={
"value": x[1],
Expand Down
2 changes: 2 additions & 0 deletions ivy_tests/test_ivy/test_frontends/test_torch/test_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4023,6 +4023,7 @@ def test_torch_bernoulli(
frontend_method_data,
init_flags,
method_flags,
on_device,
backend_fw,
):
input_dtype, x = dtype_and_x
Expand All @@ -4038,6 +4039,7 @@ def test_torch_bernoulli(
init_flags=init_flags,
method_flags=method_flags,
frontend=frontend,
on_device=on_device,
)


Expand Down

0 comments on commit 86c3a75

Please sign in to comment.