toArray() {
	        const stype = this.dtype;
	        if (stype == "float32") {
	            return new Float32Array(this.toRawBytes().buffer);
	        }
	        else if (stype == "float64") {
	            return new Float64Array(this.toRawBytes().buffer);
	        }
	        else if (stype == "int32") {
	            return new Int32Array(this.toRawBytes().buffer);
	        }
	        else if (stype == "int8") {
	            return new Int8Array(this.toRawBytes().buffer);
	        }
	        else if (stype == "uint8") {
	            return new Uint8Array(this.toRawBytes().buffer);
	        }
	        else {
	            throw new Error("Unsupported data type " + this.dtype);
	        }
	    }
Return a TypedArray copy of the NDArray, the specific type depends on
the dtype of the NDArray.
@returns The result array.