(unpickler)
| 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); |
| 20928 | if (size !== this.size()) { |
| 20929 | throw new python.Error('Typed storage size mismatch.'); |
| 20930 | } |
| 20931 | const itemsize = this.dtype.itemsize(); |
| 20932 | const data = unpickler.stream(itemsize * size); |
| 20933 | this._set_cdata(data); |
| 20934 | } |
| 20935 | static _new_with_file(unpickler) { |
| 20936 | const buffer = unpickler.read(8); |
| 20937 | const size = buffer.reverse().reduce((a, b) => (a * 256) + b, 0); |
no test coverage detected