Skip to content

Commit e697438

Browse files
committed
Update numbers text rendering
1 parent 931fb15 commit e697438

File tree

6 files changed

+413
-401
lines changed

6 files changed

+413
-401
lines changed

arrayjit/lib/ndarray.ml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,12 @@ let log_debug_info ~from_log_level:_level _nd =
447447

448448
let concise_float ~prec v =
449449
Printf.sprintf "%.*e" prec v
450-
|>
451450
(* The C99 standard requires at least two digits for the exponent, but the leading zero is a waste
452451
of space. *)
453-
String.substr_replace_first ~pattern:"e+0" ~with_:"e+"
454-
|> String.substr_replace_first ~pattern:"e-0" ~with_:"e-"
452+
|> String.substr_replace_all ~pattern:"e+0" ~with_:"e+"
453+
|> String.substr_replace_all ~pattern:"e-0" ~with_:"e-"
454+
|> String.substr_replace_all ~pattern:"e+0" ~with_:"e+"
455+
|> String.substr_replace_all ~pattern:"e-0" ~with_:"e-"
455456

456457
(** Prints 0-based [indices] entries out of [arr], where a number between [-5] and [-1] in an axis
457458
means to print out the axis, and a non-negative number means to print out only the indexed

0 commit comments

Comments
 (0)