import { U as t, V as s, W as a } from "./index-DSGwv2Yx.js";
function i(n, r, o) {
  if (t(n), r != null && r.length !== 2)
    throw new Error("tensor2d() requires shape to have two numbers");
  const e = s(n, o);
  if (e.length !== 2 && e.length !== 1)
    throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");
  if (e.length === 1 && r == null)
    throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");
  return a(n, r, e, o);
}
export {
  i as t
};
