nj.array with un-fixed shape
huan opened this issue · comments
I do not know if sometimes the data array has the un-standarded shape, like the following code:
const a = nj.array([0, [1, 2], [2, 3], [[4, [5, 6]]], 4])
console.log(a.shape) // Output: [ 5 ]
My question is: a.shape
will be calculated only with the first-row element.
Should I never use this kind of un-fixed shape?
A related TypeScript issue: DefinitelyTyped/DefinitelyTyped#18508 (comment)
since the purpose of this lib is linear algebra, the shape has to be fixed (like it is in numpy)
Thanks, you are right.