mathai 2.4.3__tar.gz → 2.4.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. {mathai-2.4.3 → mathai-2.4.5}/PKG-INFO +1 -1
  2. {mathai-2.4.3 → mathai-2.4.5}/mathai/benchmark.py +12 -6
  3. {mathai-2.4.3 → mathai-2.4.5}/mathai.egg-info/PKG-INFO +1 -1
  4. {mathai-2.4.3 → mathai-2.4.5}/setup.py +1 -1
  5. {mathai-2.4.3 → mathai-2.4.5}/README.md +0 -0
  6. {mathai-2.4.3 → mathai-2.4.5}/mathai/__init__.py +0 -0
  7. {mathai-2.4.3 → mathai-2.4.5}/mathai/apart.py +0 -0
  8. {mathai-2.4.3 → mathai-2.4.5}/mathai/base.py +0 -0
  9. {mathai-2.4.3 → mathai-2.4.5}/mathai/decision.py +0 -0
  10. {mathai-2.4.3 → mathai-2.4.5}/mathai/diff.py +0 -0
  11. {mathai-2.4.3 → mathai-2.4.5}/mathai/electronic.py +0 -0
  12. {mathai-2.4.3 → mathai-2.4.5}/mathai/expand.py +0 -0
  13. {mathai-2.4.3 → mathai-2.4.5}/mathai/factor.py +0 -0
  14. {mathai-2.4.3 → mathai-2.4.5}/mathai/formula_applier.py +0 -0
  15. {mathai-2.4.3 → mathai-2.4.5}/mathai/formula_compiler.py +0 -0
  16. {mathai-2.4.3 → mathai-2.4.5}/mathai/fraction.py +0 -0
  17. {mathai-2.4.3 → mathai-2.4.5}/mathai/graphics.py +0 -0
  18. {mathai-2.4.3 → mathai-2.4.5}/mathai/integrate.py +0 -0
  19. {mathai-2.4.3 → mathai-2.4.5}/mathai/inverse.py +0 -0
  20. {mathai-2.4.3 → mathai-2.4.5}/mathai/lambda_calculus.py +0 -0
  21. {mathai-2.4.3 → mathai-2.4.5}/mathai/limit.py +0 -0
  22. {mathai-2.4.3 → mathai-2.4.5}/mathai/linear.py +0 -0
  23. {mathai-2.4.3 → mathai-2.4.5}/mathai/logic.py +0 -0
  24. {mathai-2.4.3 → mathai-2.4.5}/mathai/matrix.py +0 -0
  25. {mathai-2.4.3 → mathai-2.4.5}/mathai/ml.py +0 -0
  26. {mathai-2.4.3 → mathai-2.4.5}/mathai/mlscalar.py +0 -0
  27. {mathai-2.4.3 → mathai-2.4.5}/mathai/ncert_data.txt +0 -0
  28. {mathai-2.4.3 → mathai-2.4.5}/mathai/ode.py +0 -0
  29. {mathai-2.4.3 → mathai-2.4.5}/mathai/parser.py +0 -0
  30. {mathai-2.4.3 → mathai-2.4.5}/mathai/pde.py +0 -0
  31. {mathai-2.4.3 → mathai-2.4.5}/mathai/printeq.py +0 -0
  32. {mathai-2.4.3 → mathai-2.4.5}/mathai/qm.py +0 -0
  33. {mathai-2.4.3 → mathai-2.4.5}/mathai/simplify.py +0 -0
  34. {mathai-2.4.3 → mathai-2.4.5}/mathai/statistics.py +0 -0
  35. {mathai-2.4.3 → mathai-2.4.5}/mathai/test.py +0 -0
  36. {mathai-2.4.3 → mathai-2.4.5}/mathai/tool.py +0 -0
  37. {mathai-2.4.3 → mathai-2.4.5}/mathai/trig.py +0 -0
  38. {mathai-2.4.3 → mathai-2.4.5}/mathai/univariate_inequality.py +0 -0
  39. {mathai-2.4.3 → mathai-2.4.5}/mathai.egg-info/SOURCES.txt +0 -0
  40. {mathai-2.4.3 → mathai-2.4.5}/mathai.egg-info/dependency_links.txt +0 -0
  41. {mathai-2.4.3 → mathai-2.4.5}/mathai.egg-info/top_level.txt +0 -0
  42. {mathai-2.4.3 → mathai-2.4.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 2.4.3
3
+ Version: 2.4.5
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai
6
6
  Requires-Python: >=3.7
@@ -9,17 +9,23 @@ from .integrate import integrate_subs_main as integrate_subs
9
9
  from .integrate import solve_integrate as integrate_clean
10
10
  from .factor import factor2
11
11
  from .trig import trig0, trig1, trig4
12
+ from pathlib import Path
12
13
  fx_list = [simplify, expand, fraction, integrate_formula, integrate_subs, integrate_trig_formula, integrate_clean, apart, trig0, trig1, trig4, integrate_fraction, factor2]
13
14
  name_list = "simplify, expand, fraction, integrate_formula, integrate_subs, integrate_trig_formula, integrate_clean, apart, trig0, trig1, trig4, integrate_fraction, factor2".split(", ")
14
15
  def benchmark_ncert():
15
- with open("mathai/ncert_data.txt", "r", encoding="utf-8") as file:
16
- content = file.read()
17
- content = content.strip().split("\n")
16
+ # Locate ncert_data.txt in the same directory as this benchmark.py file
17
+ data_path = Path(__file__).parent / "ncert_data.txt"
18
+
19
+ with open(data_path, "r", encoding="utf-8") as file:
20
+ content = file.read().strip().split("\n")
18
21
  count = 0
19
22
  for item in content:
20
23
  count += 1
21
24
  item = item.strip()
22
- eq = simplify(parse(item.split(" ")[0]))
23
- for item2 in item.split(" ")[1:]:
25
+ if not item:
26
+ continue
27
+ parts = item.split(" ")
28
+ eq = simplify(parse(parts[0]))
29
+ for item2 in parts[1:]:
24
30
  eq = fx_list[name_list.index(item2)](eq)
25
- print(f"{count}. {item.split(" ")[0]} => {eq}")
31
+ print(f"{count}. {parts[0]} => {eq}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 2.4.3
3
+ Version: 2.4.5
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai
6
6
  Requires-Python: >=3.7
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
3
3
 
4
4
  setup(
5
5
  name="mathai",
6
- version="2.4.3",
6
+ version="2.4.5",
7
7
  description="Mathematics solving Ai tailored to NCERT",
8
8
  long_description=Path("README.md").read_text(encoding="utf-8"),
9
9
  long_description_content_type="text/markdown",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes