Updated import path for base_solution_linear function from sympy.solvers.diophantine.diophantine to ensure compatibility with the latest sympy version.
Replaced np.object with object for dtype specifications in numpy arrays to avoid deprecation warnings.
These changes improve code compatibility with newer libraries.
Files Changed
mathematics_dataset/sample/polynomials.py
Detailed Changes
Import Path Update:
Changed (Edit):
from sympy.solvers.diophantine import base_solution_linear as diophantine_solve_linear_2d
to:
try:
from sympy.solvers.diophantine.diophantine import base_solution_linear as diophantine_solve_linear_2d
except ImportError:
from sympy.solvers.diophantine import base_solution_linear as diophantine_solve_linear_2d
Numpy Dtype Adjustment:
Updated dtype from np.object to object in the following lines:
Will this import work with older versions of sympy? If not - could it be changed to have some conditional import depending on version (or e.g. try: ... except ImportError: ...) Thanks!
Description
base_solution_linear
function fromsympy.solvers.diophantine.diophantine
to ensure compatibility with the latest sympy version.np.object
withobject
for dtype specifications in numpy arrays to avoid deprecation warnings.Files Changed
mathematics_dataset/sample/polynomials.py
Detailed Changes
Import Path Update:
to:
Numpy Dtype Adjustment:
np.object
toobject
in the following lines:to:
to: