-
|
I used the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Can you reference any place in the documentation in which it is implied that it is valid to take the lcm of a single array? The first line of the documentation specifically says "... of two or more values or arrays" (emphasis mine). So if you supply multiple scalar entries, it will take the lcm of all of them. If you supply two (or more) matrices/arrays, they must have the same shape, and then the result will again be that shape, and each entry will be the lcm of the corresponding entries of the arguments to lcm. If you wish to take the lcm of all of the elements in a single array |
Beta Was this translation helpful? Give feedback.



Can you reference any place in the documentation in which it is implied that it is valid to take the lcm of a single array? The first line of the documentation specifically says "... of two or more values or arrays" (emphasis mine). So if you supply multiple scalar entries, it will take the lcm of all of them. If you supply two (or more) matrices/arrays, they must have the same shape, and then the result will again be that shape, and each entry will be the lcm of the corresponding entries of the arguments to lcm.
If you wish to take the lcm of all of the elements in a single array
A, presuming that it is just an ordinary array of numbers (or other scalar type mathjs can handle), I would r…