Skip to content

Commit

Permalink
kron to use only 2-D arrays as tensorflow backend only support 2-D ar…
Browse files Browse the repository at this point in the history
…rays (ivy-llc#10763)

The bug in the `tensorflow.experimental.kron` reported here: tensorflow/tensorflow#59761
  • Loading branch information
fnhirwa authored Feb 21, 2023
1 parent ea1cba4 commit d54ed44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def matrix_exp(


def eig(
x: Union[tf.Tensor],
x: Union[tf.Tensor, tf.Variable],
/,
*,
out: Optional[Union[tf.Tensor, tf.Variable]] = None,
Expand All @@ -72,7 +72,7 @@ def eig(


def eigvals(
x: Union[tf.Tensor],
x: Union[tf.Tensor, tf.Variable],
/,
) -> Union[tf.Tensor, tf.Variable]:
if not ivy.dtype(x) in (ivy.float32, ivy.float64, ivy.complex64, ivy.complex128):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,17 @@ def test_diagflat(
fn_tree="functional.ivy.experimental.kron",
dtype_x=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("numeric"),
min_num_dims=1,
max_num_dims=3,
min_num_dims=2,
max_num_dims=2,
min_dim_size=1,
max_dim_size=3,
max_dim_size=10,
num_arrays=2,
shared_dtype=True,
),
test_gradients=st.just(False),
)
def test_kron(
*,
dtype_x,
test_flags,
backend_fw,
Expand Down

0 comments on commit d54ed44

Please sign in to comment.