I think I must have just spent more time (5 mins) looking at this repo trying to understand why you posted it, than you spent actually coding this.<p>I don't want to put you off, but there's no substance at all here, I'd have assumed Claude wrote it based on the fact you've vendored in rules, but the code is so questionable, even an LLM from 2022 would do better. E.g. 'flattenData' from utils could just be [1] rather than a BFS, though I don't really get why your public API allows TensorData to be a single integer in the first place, 50% of your logic is to work around that.<p>But rant over. My point is, maybe post this when you've built even 5% of PyTorch, or learnt something of value, or have something tangible to impart upon us, rather than a library of ill-thought-out array utils.<p>1:
flattenData = (x: TensorData) => Array.isArray(x) ? x.flat(Infinity) : [x]