Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
one fix
  • Loading branch information
xadupre committed Feb 19, 2025
commit d7c89f20bad24c6d91f31989dd25e18265c779dd
2 changes: 1 addition & 1 deletion onnx_array_api/graph_api/graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def __init__(
self.constants_[node.output[0]] = node
self.set_shape(node.output[0], self._get_tensor_shape(node))
self.set_type(node.output[0], self._get_tensor_type(node))
for f in proto.function:
for f in proto.functions:
self.add_function(f)
else:
raise NotImplementedError(
Expand Down
3 changes: 2 additions & 1 deletion onnx_array_api/translate_api/builder_emitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def _emit_end_signature(self, **kwargs: Dict[str, Any]) -> List[str]:
for init in self.inits:
val = to_array(init)
stype = str(val.dtype).split(".")[-1]
rows.append(f" {init.name} = np.array({val.tolist()}, dtype=np.{stype})")
name = self._clean_result_name(init.name)
rows.append(f" {name} = np.array({val.tolist()}, dtype=np.{stype})")
return rows

def _emit_begin_return(self, **kwargs: Dict[str, Any]) -> List[str]:
Expand Down