Skip to content

Commit

Permalink
Update view.js (#1285)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jun 26, 2024
1 parent 1dbaf60 commit fb22f97
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -3295,13 +3295,15 @@ view.TensorSidebar = class extends view.ObjectSidebar {
}
const type = tensor.type;
if (type) {
const value = type.toString().split('<').join('&lt;').split('>').join('&gt;');
const dataType = type.dataType;
this.addProperty('type', `${dataType}`, 'code');
const shape = type.shape.dimensions.toString(', ');
this.addProperty('shape', `${shape}`, 'code');
const denotation = type.denotation;
const layout = type.layout;
this.addProperty('type', `${value}`, 'code');
if (denotation) {
this.addProperty('denotation', denotation, 'code');
}
const layout = type.layout;
if (layout) {
this.addProperty('layout', layout.replace('.', ' '));
}
Expand Down

0 comments on commit fb22f97

Please sign in to comment.