The IDE shows runtime error, ‘AttributeError: module ‘numpy’ has no attribute ‘gcd’’
when the numpy function gcd is used.
Question: RECIPE
my solution:
‘’’
import numpy as np
for i in range(int(input())):
ingredients,items = map(int,input().split())
hcf = np.gcd.reduce(items)
print([x//hcf for x in items])
‘’’
It is available from numpy version 1.15.0
how to use that version?
pip install "numpy==1.15.0"