How do I prevent getting large values when calculating denominator when using linspace?

后端 未结 0 1674
北荒
北荒 2021-02-01 06:36
x = np.linspace(-1,1,10)
for k in x:
    print (Fraction(k).denominator)

I \'m trying to get the denominator for this values in this range, but I get th

相关标签:
回答
  • 消灭零回复
提交回复
热议问题