| 2946 | this.registerType('joblib.numpy_pickle.NumpyArrayWrapper', class { |
| 2947 | |
| 2948 | __read__(unpickler) { |
| 2949 | if (this.dtype.__name__ === 'object') { |
| 2950 | return unpickler.load(); |
| 2951 | } |
| 2952 | if (this.numpy_array_alignment_bytes) { |
| 2953 | const [size] = unpickler.read(1); |
| 2954 | unpickler.read(size); |
| 2955 | } |
| 2956 | const size = this.dtype.itemsize * this.shape.reduce((a, b) => a * b, 1); |
| 2957 | this.data = unpickler.read(size); |
| 2958 | return new this.subclass(this.shape, this.dtype, this.data, undefined, undefined, this.order); |
| 2959 | } |
| 2960 | }); |
| 2961 | this.registerType('joblib.numpy_pickle.NDArrayWrapper', class { |
| 2962 | |