Skip to content
Discussion options

You must be logged in to vote

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…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@IamsadVN
Comment options

Answer selected by IamsadVN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants