From b961856e5f06fb9506796453a56f587d1d5a7a98 Mon Sep 17 00:00:00 2001 From: Tarry Singh Date: Thu, 19 Jan 2023 12:20:40 +0000 Subject: [PATCH] =?UTF-8?q?zml/tensor:=20correct=20typo=20in=20uniform=20c?= =?UTF-8?q?omment=20('substract'=20=E2=86=92=20'subtract')?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zml/tensor.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zml/tensor.zig b/zml/tensor.zig index 0c92825..b408aff 100644 --- a/zml/tensor.zig +++ b/zml/tensor.zig @@ -523,7 +523,7 @@ pub const Tensor = struct { float_bits = float_bits.logical(.OR, scalar(1, dt).bitCast(uint_dtype)); // float_bits now uniformly represents number in [1, 2[ range. - // Let's convert to floats, and substract one to go to [0, 1[ range. + // Let's convert to floats, and subtract one to go to [0, 1[ range. var floats = float_bits.bitCast(dt).sub(scalar(1, dt)); floats = floats.mul(scalar(opts.max - opts.min, dt)).addConstant(opts.min);