python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Assign variables in groups based on fractions and several conditions
I've tried for several days on something I think should be rather simple, with no luck. Hope someone can help me!
I have a data frame called "test" with the following variables: "Firm&q...
Peter_96
Votes: 0
Answers: 1
Using the Fraction package with Numpy.linalg: No loop matching the specified signature and casting was found for ufunc solve
To prevent floating point issues I'm migrating my code to use Fraction.
I'm getting an issue where numpy doesn't seem to be able to Handle numbers cast as Fractions.
Would someone know if there is a w...
Mandelbrotter
Votes: 0
Answers: 1
How to calculate sum of reciprocals with integers?
I would like to calculate the sum of reciprocals of a list of integers (and see if it is larger or equal to 1):
I want to work with integers to avoid floating-point rounding issues. To do so, I want ...
Rémi Baudoux
Votes: 0
Answers: 3
Accurate Fractions with Python
I'm not seeing the mathematical results I'm expecting from the following code, which I believe should produce the Harmonic Series:
from fractions import Fraction
def sum_fracs(n):
if n == 1:
...
Robin Andrews
Votes: 0
Answers: 1