Skip to content

Commit

Permalink
fix: device check in tf backend asarray
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Armstrong committed Jul 23, 2024
1 parent 5d48fb3 commit b48da63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ivy/functional/backends/tensorflow/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def asarray(
ret = tf.convert_to_tensor(obj_np, dtype)
else:
ret = tf.convert_to_tensor(obj, dtype)
return tf.identity(ret) if (copy or ret.device != device) else ret
return tf.identity(ret) if (copy or ivy.as_native_dev(ivy.dev(ret)) != device) else ret


def empty(
Expand Down

0 comments on commit b48da63

Please sign in to comment.