mathai 2.2.2__tar.gz → 2.2.3__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.
- {mathai-2.2.2 → mathai-2.2.3}/PKG-INFO +18 -5
- {mathai-2.2.2 → mathai-2.2.3}/README.md +17 -4
- {mathai-2.2.2 → mathai-2.2.3}/mathai/__init__.py +1 -1
- {mathai-2.2.2 → mathai-2.2.3}/mathai/graphics.py +21 -8
- {mathai-2.2.2 → mathai-2.2.3}/mathai.egg-info/PKG-INFO +18 -5
- {mathai-2.2.2 → mathai-2.2.3}/setup.py +1 -1
- {mathai-2.2.2 → mathai-2.2.3}/mathai/apart.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/base.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/decision.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/diff.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/electronic.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/expand.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/factor.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/differentiation.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/integration.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/integration_trig.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/is_integrate_subs.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/lambda_compress.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/lambda_expand.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/lambda_reduce.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/limit_infinity.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/matrix_vectorization_calculus.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/power_rule.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/quadratic.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/statistics_1.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/statistics_2.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/test.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula/trigonometry_misc.marshal +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula_compiler.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula_data.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/formula_interpretor.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/fraction.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/integrate.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/inverse.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/lambda_calculus.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/limit.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/linear.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/logic.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/matrix.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/ml.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/mlscalar.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/ode.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/parser.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/pde.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/printeq.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/qm.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/simplify.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/statistics.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/test.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/tool.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/trig.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai/univariate_inequality.py +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai.egg-info/SOURCES.txt +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai.egg-info/dependency_links.txt +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai.egg-info/requires.txt +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/mathai.egg-info/top_level.txt +0 -0
- {mathai-2.2.2 → mathai-2.2.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mathai
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: Mathematics solving Ai tailored to NCERT
|
|
5
5
|
Home-page: https://github.com/infinity390/mathai
|
|
6
6
|
Requires-Python: >=3.7
|
|
@@ -453,14 +453,27 @@ done
|
|
|
453
453
|
#### Example Demonstration 11 (engineering graphics)
|
|
454
454
|
```python
|
|
455
455
|
from mathai import *
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
456
|
+
# (z,y) is dash, a'b' is front view
|
|
457
|
+
# (z,-x) is no dash, ab is top view
|
|
458
|
+
solve_graphics_string("30 20 0 None None None None None None 0 40*pi/180 None None 60")
|
|
459
459
|
```
|
|
460
460
|
|
|
461
461
|
#### Output
|
|
462
462
|
```
|
|
463
|
-
|
|
463
|
+
Ax : 30
|
|
464
|
+
Ay : 20
|
|
465
|
+
Az : 0
|
|
466
|
+
Bx : 30
|
|
467
|
+
By : 20+(60*sin(((2*pi)/9)))
|
|
468
|
+
Bz : 60*abs(cos(((2*pi)/9)))
|
|
469
|
+
Bx-Ax : 0
|
|
470
|
+
By-Ay : 60*sin(((2*pi)/9))
|
|
471
|
+
Bz-Az : 60*abs(cos(((2*pi)/9)))
|
|
472
|
+
inclination_with_VP : 0
|
|
473
|
+
inclination_with_HP : (2*pi)/9
|
|
474
|
+
front_view_length : 60
|
|
475
|
+
top_view_length : 60*abs(cos(((2*pi)/9)))
|
|
476
|
+
line_length : 60
|
|
464
477
|
```
|
|
465
478
|
|
|
466
479
|
### Questions solved using god() function
|
|
@@ -437,14 +437,27 @@ done
|
|
|
437
437
|
#### Example Demonstration 11 (engineering graphics)
|
|
438
438
|
```python
|
|
439
439
|
from mathai import *
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
# (z,y) is dash, a'b' is front view
|
|
441
|
+
# (z,-x) is no dash, ab is top view
|
|
442
|
+
solve_graphics_string("30 20 0 None None None None None None 0 40*pi/180 None None 60")
|
|
443
443
|
```
|
|
444
444
|
|
|
445
445
|
#### Output
|
|
446
446
|
```
|
|
447
|
-
|
|
447
|
+
Ax : 30
|
|
448
|
+
Ay : 20
|
|
449
|
+
Az : 0
|
|
450
|
+
Bx : 30
|
|
451
|
+
By : 20+(60*sin(((2*pi)/9)))
|
|
452
|
+
Bz : 60*abs(cos(((2*pi)/9)))
|
|
453
|
+
Bx-Ax : 0
|
|
454
|
+
By-Ay : 60*sin(((2*pi)/9))
|
|
455
|
+
Bz-Az : 60*abs(cos(((2*pi)/9)))
|
|
456
|
+
inclination_with_VP : 0
|
|
457
|
+
inclination_with_HP : (2*pi)/9
|
|
458
|
+
front_view_length : 60
|
|
459
|
+
top_view_length : 60*abs(cos(((2*pi)/9)))
|
|
460
|
+
line_length : 60
|
|
448
461
|
```
|
|
449
462
|
|
|
450
463
|
### Questions solved using god() function
|
|
@@ -4,16 +4,21 @@ from .simplify import simplify
|
|
|
4
4
|
from .trig import trig0
|
|
5
5
|
import itertools
|
|
6
6
|
from .inverse import inverse
|
|
7
|
-
|
|
7
|
+
from .formula_data import compile_formula
|
|
8
|
+
from .expand import expand
|
|
9
|
+
from .parser import parse
|
|
10
|
+
def solve_graphics(Ax, Ay, Az, Bx, By, Bz, BAx, BAy, BAz, phi, theta, fvl, tvl, length):
|
|
8
11
|
eq1 = TreeNode("f_eq", [TreeNode("v_6"), TreeNode("v_3")-TreeNode("v_0")])
|
|
9
12
|
eq2 = TreeNode("f_eq", [TreeNode("v_7"), TreeNode("v_4")-TreeNode("v_1")])
|
|
10
13
|
eq3 = TreeNode("f_eq", [TreeNode("v_8"), TreeNode("v_5")-TreeNode("v_2")])
|
|
11
|
-
eq4 = TreeNode("f_eq", [TreeNode("v_6"), TreeNode("v_9").fx("sin")*TreeNode("
|
|
12
|
-
eq5 = TreeNode("f_eq", [TreeNode("v_7"), TreeNode("v_10").fx("sin")*TreeNode("
|
|
13
|
-
eq6 = TreeNode("f_eq", [TreeNode("v_8"), (TreeNode("d_1") - TreeNode("v_9").fx("sin")**2 - TreeNode("v_10").fx("sin")**2).fx("sqrt")*TreeNode("
|
|
14
|
-
eq7 = TreeNode("f_eq", [TreeNode("
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
eq4 = TreeNode("f_eq", [TreeNode("v_6"), TreeNode("v_9").fx("sin")*TreeNode("v_13")])
|
|
15
|
+
eq5 = TreeNode("f_eq", [TreeNode("v_7"), TreeNode("v_10").fx("sin")*TreeNode("v_13")])
|
|
16
|
+
eq6 = TreeNode("f_eq", [TreeNode("v_8"), (TreeNode("d_1") - TreeNode("v_9").fx("sin")**2 - TreeNode("v_10").fx("sin")**2).fx("sqrt")*TreeNode("v_13")])
|
|
17
|
+
eq7 = TreeNode("f_eq", [TreeNode("v_12")**2, (TreeNode("v_3")-TreeNode("v_0"))**2+(TreeNode("v_5")-TreeNode("v_2"))**2])
|
|
18
|
+
eq8 = TreeNode("f_eq", [TreeNode("v_11")**2, (TreeNode("v_4")-TreeNode("v_1"))**2+(TreeNode("v_5")-TreeNode("v_2"))**2])
|
|
19
|
+
q = operation("f_and", [eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8])
|
|
20
|
+
lst = [Ax, Ay, Az, Bx, By, Bz, BAx, BAy, BAz, phi, theta, fvl, tvl, length]
|
|
21
|
+
name = "Ax Ay Az Bx By Bz Bx-Ax By-Ay Bz-Az inclination_with_VP inclination_with_HP front_view_length top_view_length line_length".split(" ")
|
|
17
22
|
lst_map = {}
|
|
18
23
|
for index, item in enumerate(lst):
|
|
19
24
|
lst_map[index] = item
|
|
@@ -22,6 +27,7 @@ def solve_graphics(Ax, Ay, Az, Bx, By, Bz, BAx, BAy, BAz, phi, theta, fvl, lengt
|
|
|
22
27
|
if lst_map[i] is not None:
|
|
23
28
|
solution[f"v_{i}"] = lst_map[i]
|
|
24
29
|
done = True
|
|
30
|
+
fx = compile_formula("sin(x)^2 1-cos(x)^2 _ _ _ _ _ _ _ 2")
|
|
25
31
|
q = simplify(q)
|
|
26
32
|
while done:
|
|
27
33
|
done = False
|
|
@@ -29,7 +35,7 @@ def solve_graphics(Ax, Ay, Az, Bx, By, Bz, BAx, BAy, BAz, phi, theta, fvl, lengt
|
|
|
29
35
|
item = q.children[i]
|
|
30
36
|
for key, item2 in solution.items():
|
|
31
37
|
item = replace(item, TreeNode(key), item2)
|
|
32
|
-
item = fraction(trig0(simplify(item)))
|
|
38
|
+
item = fraction(expand(trig0(simplify(item))))
|
|
33
39
|
q.children[i] = item
|
|
34
40
|
if len(vlist(item)) == 1:
|
|
35
41
|
solution[vlist(item)[0]] = inverse(
|
|
@@ -39,4 +45,11 @@ def solve_graphics(Ax, Ay, Az, Bx, By, Bz, BAx, BAy, BAz, phi, theta, fvl, lengt
|
|
|
39
45
|
break
|
|
40
46
|
if done:
|
|
41
47
|
continue
|
|
48
|
+
for i in range(len(name)):
|
|
49
|
+
solution[name[i]] = simplify(expand(fx(solution[f"v_{i}"])))
|
|
50
|
+
del solution[f"v_{i}"]
|
|
42
51
|
return solution
|
|
52
|
+
def solve_graphics_string(s):
|
|
53
|
+
s = [None if item == "None" else parse(item) for item in s.split(" ")]
|
|
54
|
+
for key, item in solve_graphics(*s).items():
|
|
55
|
+
print(key, ":", item)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mathai
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: Mathematics solving Ai tailored to NCERT
|
|
5
5
|
Home-page: https://github.com/infinity390/mathai
|
|
6
6
|
Requires-Python: >=3.7
|
|
@@ -453,14 +453,27 @@ done
|
|
|
453
453
|
#### Example Demonstration 11 (engineering graphics)
|
|
454
454
|
```python
|
|
455
455
|
from mathai import *
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
456
|
+
# (z,y) is dash, a'b' is front view
|
|
457
|
+
# (z,-x) is no dash, ab is top view
|
|
458
|
+
solve_graphics_string("30 20 0 None None None None None None 0 40*pi/180 None None 60")
|
|
459
459
|
```
|
|
460
460
|
|
|
461
461
|
#### Output
|
|
462
462
|
```
|
|
463
|
-
|
|
463
|
+
Ax : 30
|
|
464
|
+
Ay : 20
|
|
465
|
+
Az : 0
|
|
466
|
+
Bx : 30
|
|
467
|
+
By : 20+(60*sin(((2*pi)/9)))
|
|
468
|
+
Bz : 60*abs(cos(((2*pi)/9)))
|
|
469
|
+
Bx-Ax : 0
|
|
470
|
+
By-Ay : 60*sin(((2*pi)/9))
|
|
471
|
+
Bz-Az : 60*abs(cos(((2*pi)/9)))
|
|
472
|
+
inclination_with_VP : 0
|
|
473
|
+
inclination_with_HP : (2*pi)/9
|
|
474
|
+
front_view_length : 60
|
|
475
|
+
top_view_length : 60*abs(cos(((2*pi)/9)))
|
|
476
|
+
line_length : 60
|
|
464
477
|
```
|
|
465
478
|
|
|
466
479
|
### Questions solved using god() function
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
from pathlib import Path
|
|
3
3
|
setup(
|
|
4
4
|
name="mathai",
|
|
5
|
-
version="2.2.
|
|
5
|
+
version="2.2.3",
|
|
6
6
|
description="Mathematics solving Ai tailored to NCERT",
|
|
7
7
|
long_description=Path("README.md").read_text(encoding="utf-8"),
|
|
8
8
|
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
|
|
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
|