import { o as u, q as f, a5 as i, ac as m } from "./index-DSGwv2Yx.js";
import { U as c } from "./rand_util-CZ7yLoUm.js";
function g(n, r = 0, t = 1, e = "float32", a) {
  f(n);
  const s = i(n, e), l = new c(r, t, null, a);
  for (let o = 0; o < s.values.length; o++)
    s.values[o] = l.nextValue();
  return s.toTensor();
}
const d = /* @__PURE__ */ u({ randomUniform_: g });
function U(n, r) {
  if (r == null)
    return n.shape.slice();
  if (m(n.shape, r))
    return r;
  if (n.shape.length === r.length) {
    const t = [];
    for (let e = 0; e < n.shape.length; e++)
      r[e] == null && n.shape[e] != null ? t.push(n.shape[e]) : t.push(r[e]);
    return t;
  }
  return r;
}
export {
  U as g,
  d as r
};
