haoyang9804 commented on code in PR #15683:
URL: https://github.com/apache/tvm/pull/15683#discussion_r1318198104


##########
python/tvm/relay/frontend/pytorch.py:
##########
@@ -4424,7 +4424,10 @@ def _create_typed_const(data, dtype):
     dtype should be a TVM dtype"""
 
     if dtype == "float64":
-        typed_data = _expr.const(np.float64(data), dtype=dtype)
+        if len(data) == 1:
+            typed_data = _expr.const(np.array([np.float64(data)]), dtype=dtype)
+        else:
+            typed_data = _expr.const(np.float64(data), dtype=dtype)

Review Comment:
   Thanks! I have submitted a issue to Numpy community 
[here](https://github.com/numpy/numpy/issues/24661). 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to