Create a new var with specified shape and type if the original var's shape or type does not match with the specified ones. Parameters ---------- var : Var The var to be updated. struct_info : StructInfo The struct info. Return
(self, var: Var, struct_info: StructInfo)
| 1522 | return _ffi_api.PyExprMutatorLookupBinding(self._outer(), var) # type: ignore |
| 1523 | |
| 1524 | def with_struct_info(self, var: Var, struct_info: StructInfo) -> Var: |
| 1525 | """Create a new var with specified shape and type if the original var's shape or type does |
| 1526 | not match with the specified ones. |
| 1527 | |
| 1528 | Parameters |
| 1529 | ---------- |
| 1530 | var : Var |
| 1531 | The var to be updated. |
| 1532 | struct_info : StructInfo |
| 1533 | The struct info. |
| 1534 | |
| 1535 | Returns |
| 1536 | ------- |
| 1537 | var : Var |
| 1538 | The var filled with shape and type. |
| 1539 | """ |
| 1540 | # Using self._outer() to ref _PyExprMutator |
| 1541 | return _ffi_api.PyExprMutatorWithStructInfo(self._outer(), var, struct_info) # type: ignore |
no outgoing calls