This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm-ffi.git


The following commit(s) were added to refs/heads/main by this push:
     new 6643e2c  docs: document structural_equal and structural_hash for Array 
and Map (#379)
6643e2c is described below

commit 6643e2c0579c8a4ea80cc59948fcbc2a76743a57
Author: Guan-Ming (Wesley) Chiu <[email protected]>
AuthorDate: Fri Jan 9 21:59:31 2026 +0800

    docs: document structural_equal and structural_hash for Array and Map (#379)
    
    ## Why
    
    Users need guidance on how to perform structural equality comparison for
    containers.
    
    ## How
    
    - Add notes to Array and Map docstrings pointing to structural_equal and
    structural_hash APIs
---
 python/tvm_ffi/container.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/python/tvm_ffi/container.py b/python/tvm_ffi/container.py
index 2b64ed6..3f6884f 100644
--- a/python/tvm_ffi/container.py
+++ b/python/tvm_ffi/container.py
@@ -144,6 +144,10 @@ class Array(core.Object, Sequence[T]):
         a = tvm_ffi.Array([1, 2, 3])
         assert tuple(a) == (1, 2, 3)
 
+    Notes
+    -----
+    For structural equality and hashing, use ``structural_equal`` and 
``structural_hash`` APIs.
+
     See Also
     --------
     :py:func:`tvm_ffi.convert`
@@ -298,6 +302,10 @@ class Map(core.Object, Mapping[K, V]):
         assert amap["a"] == 1
         assert amap["b"] == 2
 
+    Notes
+    -----
+    For structural equality and hashing, use ``structural_equal`` and 
``structural_hash`` APIs.
+
     See Also
     --------
     :py:func:`tvm_ffi.convert`

Reply via email to