MCPcopy Index your code
hub / github.com/lutzroeder/netron / _set_cdata

Method _set_cdata

source/python.js:20918–20924  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

20916 return this._cdata;
20917 }
20918 _set_cdata(data) {
20919 const length = this.size() * this.dtype.itemsize();
20920 if (length !== data.length) {
20921 throw new python.Error('Typed storage data size mismatch.');
20922 }
20923 this._cdata = data;
20924 }
20925 _set_from_file(unpickler) {
20926 const buffer = unpickler.read(8);
20927 const size = buffer.reverse().reduce((a, b) => (a * 256) + b, 0);

Callers 8

constructorMethod · 0.80
persistent_loadMethod · 0.80
LEGACY_deserializeMethod · 0.80
readArchiveAndTensorsMethod · 0.80
load_pickleMethod · 0.80
_set_from_fileMethod · 0.80
_new_with_fileMethod · 0.80

Calls 2

itemsizeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected