import { v as s } from "./index-DSGwv2Yx.js";
function h(n, o) {
  const t = n[0].length;
  n.forEach((a, c) => {
    s(a.length === t, () => `Error in concat${t}D: rank of tensors[${c}] must be the same as the rank of the rest (${t})`);
  }), s(o >= 0 && o < t, () => `Error in concat${t}D: axis must be between 0 and ${t - 1}.`);
  const e = n[0];
  n.forEach((a, c) => {
    for (let r = 0; r < t; r++)
      s(r === o || a[r] === e[r], () => `Error in concat${t}D: Shape of tensors[${c}] (${a}) does not match the shape of the rest (${e}) along the non-concatenated axis ${c}.`);
  });
}
function $(n, o) {
  const t = n[0].slice();
  for (let e = 1; e < n.length; e++)
    t[o] += n[e][o];
  return t;
}
export {
  h as a,
  $ as c
};
