You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
R's t() and diag() preserve their input's type, but the handlers
unconditionally cast to double: t(m) and diag(m) on an integer matrix
returned doubles, and the constructor forms diag(x) / diag(x, nrow,
ncol) lost typeof(x) too. Only the identity forms (diag(n),
diag(nrow = n)) are double in R, which is what quickr already emits
for them.
Drop the maybe_cast_double() calls and carry the input mode through
the result Variable, the hoisted temporaries, and the zero fill in
diag_matrix(). can_use_output() gains a `mode` argument (default
"double"; all other callers unchanged) so an in-place destination is
only used when its declared mode matches, and infer_dest_diag()
reports the input's mode instead of hard-coding double -- a
double-inferred dest would have mislabeled an integer result's
declaration.
The transpose casts in unwrap_transpose_arg() stay, now with a
comment saying why: that path only feeds matrix products, which
always return double in R.
0 commit comments