MCPcopy
hub / github.com/lutzroeder/netron / printAttrValue

Method printAttrValue

source/python.js:13055–13074  ·  view source on GitHub ↗
(out, name)

Source from the content-addressed store, hash-verified

13053 out.write(']');
13054 }
13055 printAttrValue(out, name) {
13056 const kind = this.kindOf(name);
13057 switch (kind) {
13058 case 'c': case 'cs': case 'f': case 'fs': case 'i': case 'is':
13059 case 'ss': case 'ival': case 'ty':
13060 out.write(this[kind](name));
13061 break;
13062 case 's':
13063 out.write(`"${this.s(name)}"`);
13064 break;
13065 case 't':
13066 out.write(`"{}"`);
13067 break;
13068 case 'ts': out.write('[<Tensors>]'); break;
13069 case 'g': out.write('[<Graph>]'); break;
13070 case 'gs': out.write('[<Graphs>]'); break;
13071 case 'tys': this.printTypeList(out, this.tys(name)); break;
13072 default: throw new python.Error(`Unknown attribute kind '${kind}'.`);
13073 }
13074 }
13075 print(out, level, groups, print_source_locations, print_attributes, print_scopes, print_body) {
13076 print_source_locations = print_source_locations === false ? false : true;
13077 print_attributes = print_attributes === false ? false : true;

Callers 1

print_attributesMethod · 0.80

Calls 5

kindOfMethod · 0.80
sMethod · 0.80
printTypeListMethod · 0.80
tysMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected