Sujet : Relatively prime integers in NumPy
De : dpopov (at) *nospam* anl.gov (Popov, Dmitry Yu)
Groupes : comp.lang.pythonDate : 08. Jul 2024, 21:09:45
Autres entêtes
Message-ID : <mailman.28.1720707316.2981.python-list@python.org>
References : 1
Dear Sirs.
Does NumPy provide a simple mechanism to identify relatively prime integers, i.e. integers which don't have a common factor other than +1 or -1? For example, in case of this array:
[[1,5,8],
[2,4,8],
[3,3,9]]
I can imagine a function which would return array of common factors along axis 0: [1,2,3]. Those triples of numbers along axis 1 with the factor of1 or -1 would be relatively prime integers.
Regards,
Dmitry Popov
Argonne, IL
USA