mathai 0.6.6__py3-none-any.whl → 0.6.7__py3-none-any.whl

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/matrix.py CHANGED
@@ -217,7 +217,7 @@ def use(eq):
217
217
  def _matrix_solve(eq):
218
218
  if TreeNode.matmul == True:
219
219
  TreeNode.matmul = False
220
- eq = flat(fold_wmul(flat(eq)))
220
+ eq = dowhile(eq, lambda x: fold_wmul(flat(x)))
221
221
  TreeNode.matmul = True
222
222
  return eq
223
223
  def matrix_solve(eq):
mathai/parser.py CHANGED
@@ -152,11 +152,13 @@ def parse(equation, funclist=None):
152
152
  return tree_form("v_" + str(int(tree_node.name[3:])+100))
153
153
  tree_node.children = [rfx(child) for child in tree_node.children]
154
154
  return tree_node
155
+ def use(eq):
156
+ return TreeNode(eq.name, [use(child) for child in eq.children])
155
157
  tree_node = rfx(tree_node)
156
158
  tree_node = flatten_tree(tree_node, ["f_wmul"])
157
159
  if TreeNode.matmul == True:
158
160
  TreeNode.matmul = False
159
- tree_node = tree_form(str_form(tree_node).replace("f_w","f_"))
161
+ tree_node = use(tree_form(str_form(tree_node).replace("f_w","f_")))
160
162
  TreeNode.matmul = True
161
163
  else:
162
164
  tree_node = tree_form(str_form(tree_node).replace("f_w","f_"))
mathai/simplify.py CHANGED
@@ -500,9 +500,6 @@ def solve3(eq):
500
500
  def simplify(eq, basic=True):
501
501
  if eq is None:
502
502
  return None
503
- orig = TreeNode.matmul
504
- if TreeNode.matmul == True:
505
- TreeNode.matmul = False
506
503
  if eq.name == "f_and" or eq.name == "f_not" or eq.name == "f_or":
507
504
  new_children = []
508
505
  for child in eq.children:
@@ -522,5 +519,4 @@ def simplify(eq, basic=True):
522
519
  if basic:
523
520
  eq = convert_to_basic(eq)
524
521
  eq = solve3(eq)
525
- TreeNode.matmul = orig
526
522
  return eq
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 0.6.6
3
+ Version: 0.6.7
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai4
6
6
  Author: educated indians are having a low iq and are good for nothing
@@ -12,17 +12,17 @@ mathai/inverse.py,sha256=ya7P8WjzfaAL3UXL7xqOh5GaIsXLDZ-F6lZFy3IEgaQ,2931
12
12
  mathai/limit.py,sha256=9F8i9UZh2xb-V8A5Sd1gdhDf9c2RFgpE1GdNn9MvbWI,5703
13
13
  mathai/linear.py,sha256=viGlPU8BPrjLWHlyNUvnfPHNH5d4ZBImiQMdyXaKGg0,5702
14
14
  mathai/logic.py,sha256=Ndz4Fd6aNCmzFlqoPyyIpSmV_BXmYHsurePjLyZJoNc,9809
15
- mathai/matrix.py,sha256=hsgcD7JYbgvZ8pey-YoT8oaEHdO-qmu8ICJcc6_4Ckc,7155
15
+ mathai/matrix.py,sha256=3mOowPxZTcI2hHWXtAPijwKSIOW8aSWdAntuURmR0m8,7171
16
16
  mathai/ode.py,sha256=zxxTXAOpt7oSsfpgI4vHsCWKXevmM96ZOBZWWs-vj8Y,4801
17
- mathai/parser.py,sha256=YzXCW5MmwL3J0BhR0ZrPS2wnfz77uB_enBXPjITc-a0,7303
17
+ mathai/parser.py,sha256=5nAMV_OkZvEzZoQOdqJNzMTNdZMO2UJwmSzqyyqtCBs,7399
18
18
  mathai/parsetab.py,sha256=TL-4jvRM_Tx6ipwet8CFJc2DkjR4tGsbrGF_r4IC8xI,9651
19
19
  mathai/printeq.py,sha256=MKsR6-qXig80R07vLnFPYHQMeS41FrMVj3n3arrhJpQ,1329
20
- mathai/simplify.py,sha256=NxcyEAA85FGQ2plj13EYmR5LcKmeGGLP6v8wZBs60JQ,19723
20
+ mathai/simplify.py,sha256=ZNRyNYbJd08fJav0mu6uTsgWuhr74_1eNcLYVYRMY4E,19601
21
21
  mathai/structure.py,sha256=wrU7kqphSN7CqaVffyHHXD2-3t5My_Z_TtYFoUe_lTU,4099
22
22
  mathai/tool.py,sha256=ozcXTXLbKUnyPM9r9kz9M43YA2CBcWezcqLZfEs8rpc,6051
23
23
  mathai/trig.py,sha256=fnBbfiopcQzFg4ya1BoO5M0X_aCBnse2bjnKh1juw4I,11223
24
24
  mathai/univariate_inequality.py,sha256=LPFdWgC1y5zBwnsy1wwZxj-yP_SbqFDhCmTTzhuwoiY,16469
25
- mathai-0.6.6.dist-info/METADATA,sha256=WYwBYgQZx30E6z7ROkHiXkz_g-cDxV_956i0P6TwPjk,7103
26
- mathai-0.6.6.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
27
- mathai-0.6.6.dist-info/top_level.txt,sha256=ROP4l3OhGYw3ihkQGASr18xM9GsK4z3_6whV5AyXLwE,7
28
- mathai-0.6.6.dist-info/RECORD,,
25
+ mathai-0.6.7.dist-info/METADATA,sha256=MVBG0hq0tOUs95X7hfS47bM4mqAHpj1MvhSVzlTQ_IU,7103
26
+ mathai-0.6.7.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
27
+ mathai-0.6.7.dist-info/top_level.txt,sha256=ROP4l3OhGYw3ihkQGASr18xM9GsK4z3_6whV5AyXLwE,7
28
+ mathai-0.6.7.dist-info/RECORD,,
File without changes